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": "86181858-3e68-4ded-80e8-36a95165cac2",
  "purchase_order_id": "72d10694-ebd8-41c0-b594-2d533e5206ce",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "2aba01a9-051c-45d3-bcf0-a4d64c931ada",
    "id2": 2,
    "jobs_id": "980c7e9b-0d95-4cdb-b0b1-72581cee84ce",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "3e110a97-1e7d-4afb-a121-88e5c6901738",
    "supplier_company_code": "sample string 6",
    "user_id": "78fa448a-4989-431b-b2a7-1cd7cf22df59",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-11-03T15:06:01.3824502+00:00",
    "date_update": "2026-11-03T15:06:01.3824502+00:00",
    "date_delivery": "2026-11-03T15:06:01.3824502+00:00",
    "confirmed_date_delivery": "2026-11-03T15:06:01.3824502+00:00",
    "delivery_db_address_id": "930d80c6-ab25-4ae6-b0ee-9f05f57304ce",
    "approved_by_user_id": "a393d59e-61b5-4944-b166-145abd700949",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "2f677806-21bf-4927-bd2f-54e357f158a9",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "bca28650-9188-43d2-88f0-bb64e88dd9d9",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "e820d2ca-6d8d-43cd-96f2-74b225fe964d",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-11-03T15:06:01.3824502+00:00"
  },
  "article_id": "c1611614-a06b-4814-86ff-0400f2e7a29c",
  "article_code": "sample string 5",
  "article": {
    "id": "f5148632-aa2d-45c2-af35-de1d4d53157b",
    "article_category_id": "7df45270-b11b-4578-b22d-84d12f737539",
    "article_category": {
      "id": "0428159d-1336-44b7-a888-8be274176806",
      "parent_id": "a0414d77-626a-4912-9c0c-12a7337377f6",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-11-03T15:06:01.3824502+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "8a8d7e9f-cdc9-49ab-9a27-b3a44288c50a",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "64aec9d7-942a-42be-b727-7a7a32e4b9e2",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "d99519a7-aea6-497b-a8ec-9309c5f5b341",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "b184e770-7dfd-490e-aa68-bb47355e3c89",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "f6f99fbd-0fb6-4e91-b3d3-9df39c249fce",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "81765265-b497-443e-92d1-b0a7b83412fc",
    "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-03T15:06:01.3824502+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-03T15:06:01.3824502+00:00",
    "date_update": "2026-11-03T15:06:01.3824502+00:00",
    "modified_dateutc": "2026-11-03T15:06:01.3824502+00:00",
    "article_color_id": "102dd85e-b29d-46e7-9506-622b4aecc33d",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "e650384e-c812-4fa8-bb8e-7762ae3cec8f",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-11-03T15:06:01.3824502+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "118ec65a-231c-423e-ad1b-d1fab6c68b58",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "c722624d-9a78-46b3-b16e-f4e2683609b0",
    "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-03T15:06:01.4005063+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.