Creates a new purchase order order line

Request Information

URI Parameters :

None.

Body Parameters :

purchase_order_details
NameDescriptionTypeAdditional information
id

Primary Key

globally unique identifier
purchase_order_id

Foreign key of the purchase_order

globally unique identifier

Optionally required : purchase_order_id, purchase_order_reference or purchase_order must be provided

purchase_order_reference_back_office

Embedded entity "purchase_order" using ERP PK when adding/updating

string

Optionally required : purchase_order_id, purchase_order_reference_back_office or purchase_order must be provided

purchase_order

Embedded entity "purchase_order" when adding/updating

purchase_order

Optionally required : purchase_order_id, purchase_order_reference_back_office or purchase_order must be provided

article_id

Foreign key of article

globally unique identifier

Optionally required : article_id, article_code or article must be provided

article_code

Embedded entity "article" using ERP PK when adding/updating

string

Optionally required : article_id, article_code or article must be provided

article

Embedded entity "article" when adding/updating

article

Optionally required : article_id, article_code or article must be provided

line_number

Line Number, auto filled with (Highest+1) if value is 0/null

integer
code

Code of the article (auto filled if empty)

string

Max length: 255

supplier_code

Code of the supplier for this article

string

Max length: 255

name

Article Name (will be auto filled if article.name+description are empty)

string

Max length: 255

description

Article description (will be auto filled by article.short_description if name+description are empty)

string

Max length: 255

price

Unit Price

decimal number

Matching regular expression pattern: ^[0-9]\d*(\.\d+)?$

Range: inclusive between 0.1 and 1.79769313486232E+308

quantity

Quantity

decimal number

Required

Range: inclusive between 0.1 and 1.79769313486232E+308

memo

Line memo/remark

string
cost_price

Unit Cost Price (statistic purpose)

decimal number

Matching regular expression pattern: ^[0-9]\d*(\.\d+)?$

reference_back_office

Field used for Embedded entity (store there your ERP PK)

string

Max length: 50

modified_dateutc

Readonly system field managed by database, filled with GetUtcDate when adding,updating

date

Request Formats :

application/json, text/json

Sample:
{
  "id": "0e5cf592-1d68-49fd-9c09-efc204b14b8a",
  "purchase_order_id": "f39106d5-6258-4e89-ac6c-b15affd986c6",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "52fc14c5-a0f9-4f93-9bc5-436ce8cf09d4",
    "id2": 2,
    "jobs_id": "b94c8b8e-ad9a-4623-b90f-cfa6a4ac9fe5",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "2612ff58-abe9-4826-89c8-9a5db7a3ea3a",
    "supplier_company_code": "sample string 6",
    "user_id": "4e6c2f18-c00d-45fe-bb2c-f239037be459",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-11-02T08:31:25.3783446+00:00",
    "date_update": "2026-11-02T08:31:25.5665758+00:00",
    "date_delivery": "2026-11-02T08:31:25.5665758+00:00",
    "confirmed_date_delivery": "2026-11-02T08:31:25.5665758+00:00",
    "delivery_db_address_id": "0cb81f94-dc37-4411-aa89-98f7b2d317c5",
    "approved_by_user_id": "3b6c0b36-7f27-430f-8c45-77812394039d",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "b57928f3-6152-472d-a44d-305747722f66",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "2ee88a90-4569-4621-9c81-327e98752136",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "0c8544e6-96c1-4628-9265-fcafaa6b6d46",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-11-02T08:31:25.5665758+00:00"
  },
  "article_id": "008c22a4-11ba-4863-80bd-7d3b01c4e51c",
  "article_code": "sample string 5",
  "article": {
    "id": "ca81f9a4-e7eb-42ef-8656-30fc3896ab58",
    "article_category_id": "43b0ec49-8145-4a33-aa25-9912ef450641",
    "article_category": {
      "id": "0c12db4b-3918-4563-94e1-f85529d9379e",
      "parent_id": "b84baee3-7827-43b7-92aa-bb001f98af42",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-11-02T08:31:25.5665758+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "bb0f09df-2ddc-474a-8117-c76bb5ded2c3",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "c7bf2fa5-1329-4afe-bb8e-417b6a6b8756",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "74dfb027-36eb-4bff-9fd3-a8f06eaa1a65",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "bf0cd8c8-c837-4895-a407-85a00b55c576",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "657f1fee-9f2f-4517-a760-a953c28a8765",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "3606ece1-2cf0-4c01-bdc1-7e5622c3e793",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-11-02T08:31:25.5665758+00:00",
    "article_increment": 20,
    "min_article_quantity": 21,
    "entered_price": 22.0,
    "cost_price": 23.1,
    "no_stock": true,
    "archived": true,
    "is_travel_fee": true,
    "is_mileage_fee": true,
    "code": "sample string 28",
    "name": "sample string 29",
    "description_short": "sample string 30",
    "description_long": "sample string 31",
    "barcode": "sample string 32",
    "notes": "sample string 33",
    "date_create": "2026-11-02T08:31:25.5665758+00:00",
    "date_update": "2026-11-02T08:31:25.5665758+00:00",
    "modified_dateutc": "2026-11-02T08:31:25.5665758+00:00",
    "article_color_id": "61399763-b14b-40ad-b56a-c38cdcba4f28",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "d5c25228-ca24-4b55-afcd-b1c1e8179a44",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-11-02T08:31:25.5665758+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "c2deb412-be6c-4803-a0cc-f5c8cfea62bd",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "375e969f-149c-44ae-83a3-04b76c510347",
    "db_unit_of_measure_code_selling": "sample string 44",
    "translations": [
      {
        "field_name": "sample string 1",
        "language_code": "sample string 2",
        "value_translated": "sample string 3"
      },
      {
        "field_name": "sample string 1",
        "language_code": "sample string 2",
        "value_translated": "sample string 3"
      }
    ]
  },
  "line_number": 6,
  "code": "sample string 7",
  "supplier_code": "sample string 8",
  "name": "sample string 9",
  "description": "sample string 10",
  "price": 11.0,
  "quantity": 12.0,
  "memo": "sample string 13",
  "cost_price": 14.0,
  "reference_back_office": "sample string 15",
  "modified_dateutc": "2026-11-02T08:31:25.5665758+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.