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": "f0f730cf-51d1-4371-b730-7853d359ce07",
  "purchase_order_id": "4cea9aef-7825-4b5c-afc2-56d76cab75fc",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "7142ef43-43a6-4110-b787-c7f548ced8d6",
    "id2": 2,
    "jobs_id": "d7152224-8e4f-466d-bf9c-851201fb222d",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "d21729e4-b190-4b45-a2ba-5c0e96009d87",
    "supplier_company_code": "sample string 6",
    "user_id": "2be6e5a0-db14-40ff-bf54-2a2a95c0f4ad",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-07-12T10:32:36.9576786+00:00",
    "date_update": "2026-07-12T10:32:36.9576786+00:00",
    "date_delivery": "2026-07-12T10:32:36.9576786+00:00",
    "confirmed_date_delivery": "2026-07-12T10:32:36.9576786+00:00",
    "delivery_db_address_id": "9c2a4112-7461-4118-a4e7-af2fe0d62f0f",
    "approved_by_user_id": "74d07999-5009-4b26-bfbc-fcf9f5996b4b",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "0dda2cd5-4bac-4542-bfe1-b3656edd92cf",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "6cbe2cf8-7aaf-4d67-a695-39d20aa65f56",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "a3107a7e-57e4-4c60-88e5-494be7d7c46d",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-07-12T10:32:36.9576786+00:00"
  },
  "article_id": "24e6b17b-fd9c-476b-840c-ae1bdf91e20c",
  "article_code": "sample string 5",
  "article": {
    "id": "106c6f24-d099-41a8-9387-b5808931ccb0",
    "article_category_id": "94deed65-588d-4ffd-8c7b-b81450f9ba7e",
    "article_category": {
      "id": "b71eee69-39c4-40e3-aa95-9e94d4dfccfe",
      "parent_id": "b1649038-66f2-403d-8872-f8d90f789dbd",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-07-12T10:32:36.9576786+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "ed695299-bc94-4c50-b0f5-a7eb53383673",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "e8b26a89-9d25-40b6-9860-f8f354c5a31a",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "68b2a8bd-902a-4d51-b450-13ec148ba9c0",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "a9081bba-ae64-4743-8244-d1b25896db37",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "1a80d2d5-97a6-440b-b680-5ab521c11a8b",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "46b4c5d9-7462-4d27-abaf-c77286ab8452",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-07-12T10:32:36.9576786+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-07-12T10:32:36.9576786+00:00",
    "date_update": "2026-07-12T10:32:36.9576786+00:00",
    "modified_dateutc": "2026-07-12T10:32:36.9576786+00:00",
    "article_color_id": "36f4e939-d3c6-478c-9355-a5f9c79411b6",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "342c995b-e9ff-41b5-afc2-99dd9f294355",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-07-12T10:32:36.9576786+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "290bad38-b7d1-46da-9b8b-5c7366f338cd",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "f86712eb-8aff-42ca-9b62-76e3966dcc0e",
    "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-07-12T10:32:36.9576786+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.