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": "f724fa50-8fbb-4f53-a6ed-17d1371b9795",
  "purchase_order_id": "0dfdde12-6322-4dd2-8d83-739b51e9ebcb",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "7fcc71ac-52be-46bf-a461-e9715d15db10",
    "id2": 2,
    "jobs_id": "6d04fc8e-7843-4792-8564-d6ea750ca9dc",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "032e32dc-25da-4670-af9c-160329192aa2",
    "supplier_company_code": "sample string 6",
    "user_id": "23393deb-2ea2-42d1-acb2-8eea712c750f",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-09-20T10:22:11.2748917+00:00",
    "date_update": "2026-09-20T10:22:11.2748917+00:00",
    "date_delivery": "2026-09-20T10:22:11.2748917+00:00",
    "confirmed_date_delivery": "2026-09-20T10:22:11.2748917+00:00",
    "delivery_db_address_id": "e7233e23-a814-44ef-8280-39ef955ee99c",
    "approved_by_user_id": "9b1e6382-1107-4b92-bfde-c7f35711c53c",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "0bb0ab44-f3ec-4c66-8457-0bc23642649f",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "9ab4ee59-00d4-418d-822e-4ab7d9bcd3bb",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "10cdeae6-4d1c-4efa-97c9-678baafb38ca",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-09-20T10:22:11.2748917+00:00"
  },
  "article_id": "188ee290-bbef-480b-87d7-2a9c29e78efb",
  "article_code": "sample string 5",
  "article": {
    "id": "0e6dbc6c-e314-405a-8be2-d01ea6148e4a",
    "article_category_id": "32851397-e3bc-48a1-8989-ef734320290d",
    "article_category": {
      "id": "e64cd6fa-0bd1-42a4-869c-d14cc279aa35",
      "parent_id": "b0bd6868-daac-47d7-a5d3-2f13a746a72b",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-09-20T10:22:11.2748917+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "5dfed59d-0649-4958-8773-5c4bd6a10fea",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "892fc1b6-ff5b-40dc-b7c5-d0dc3eadc1e4",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "94dd56ee-4360-4dab-84fd-f5a1e1d8da0e",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "97f5443b-3032-4118-b62e-9f17575ab554",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "6b700da1-d1c1-4218-bac7-8dd6476fa483",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "0994e13c-30a1-422e-b244-dddc9878107b",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-09-20T10:22:11.2748917+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-09-20T10:22:11.2748917+00:00",
    "date_update": "2026-09-20T10:22:11.2748917+00:00",
    "modified_dateutc": "2026-09-20T10:22:11.2748917+00:00",
    "article_color_id": "151b69d0-8b95-49f3-a270-5075cf232e9f",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "9ae7ff4b-4e53-4d16-923f-9f600d10ea9a",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-09-20T10:22:11.2748917+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "a0d06183-2705-4220-87e3-8f801390984c",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "515e7841-25c5-4f05-b322-60664b32b49b",
    "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-09-20T10:22:11.2748917+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.