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": "86f14d0d-ab2a-43f8-8d90-eddc0c82fb16",
  "purchase_order_id": "086b25f2-0840-4bf2-90c7-4bbb347310a3",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "4c257f53-f58a-4c42-9040-f90332b6ec61",
    "id2": 2,
    "jobs_id": "12261e5d-f22e-42ee-be40-028aac74f0a2",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "35f8850c-89d8-4fdc-b97c-6c1c1d61a55b",
    "supplier_company_code": "sample string 6",
    "user_id": "217da11d-389a-4564-90f1-4e111f8d899e",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-10-07T08:15:28.9095222+00:00",
    "date_update": "2026-10-07T08:15:28.9095222+00:00",
    "date_delivery": "2026-10-07T08:15:28.9095222+00:00",
    "confirmed_date_delivery": "2026-10-07T08:15:28.9095222+00:00",
    "delivery_db_address_id": "3e46202a-2cc4-42d5-8e08-cb5aaa1ed798",
    "approved_by_user_id": "7389d4cf-a5b9-4030-be3a-850105f9a574",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "06c51011-83b4-4d1d-9320-136241c1e919",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "86d6987b-c11b-4af6-a7af-5cdaa69d410c",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "973854e1-cf72-47b1-ac78-0a5171a4f121",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-10-07T08:15:28.9095222+00:00"
  },
  "article_id": "19a1a41d-64f5-42a5-8673-4b21b5f362e0",
  "article_code": "sample string 5",
  "article": {
    "id": "f5891ca2-2c9e-4e17-a823-2dcb53639bf4",
    "article_category_id": "ccfe44dc-8e7d-4fad-9a3e-0a546606caf4",
    "article_category": {
      "id": "dc0097a8-acb4-4801-98ca-45e8b8831274",
      "parent_id": "b891411e-b2a5-4bb9-a1ed-b855a392909d",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-10-07T08:15:28.9095222+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "fcd83ea8-bbb9-4570-b9a2-b235de811e60",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "7a160454-055e-4561-897b-d33a1416c285",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "5b86e5e9-fb44-443d-9827-6ad99106bb56",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "52719e33-ba27-493a-853e-431a5ce372c5",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "5692104d-94ad-45f3-a3d8-5c957de00b14",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "0fb0d336-69f6-49de-a3fa-562dcddfecce",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-10-07T08:15:28.9095222+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-10-07T08:15:28.9273548+00:00",
    "date_update": "2026-10-07T08:15:28.9273548+00:00",
    "modified_dateutc": "2026-10-07T08:15:28.9273548+00:00",
    "article_color_id": "a67243e4-653b-4868-9d23-6c3c150e4ce5",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "9138b5ff-e192-4942-a6cd-ff3b9f0eec8a",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-10-07T08:15:28.9273548+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "43e9c4be-04cd-445a-bd8f-2eebc9d80613",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "37b80f0c-2b90-404d-87de-4849b84bfce2",
    "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-10-07T08:15:28.9273548+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.