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": "735443db-c4bf-4670-9976-1738f74a6ad0",
  "purchase_order_id": "b660d006-59dd-43fe-98e9-1321f7af68ba",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "d2ea67ce-d4eb-4b26-aae0-e284f7cfcc76",
    "id2": 2,
    "jobs_id": "a169f69a-f77b-4210-bd30-d9580b3520d9",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "f0824af3-95d5-4fec-8d61-ad36ab51d39c",
    "supplier_company_code": "sample string 6",
    "user_id": "d464fa88-fe3c-4e43-bcdb-c2e9604a604b",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-04-03T20:33:14.5128516+00:00",
    "date_update": "2026-04-03T20:33:14.5128516+00:00",
    "date_delivery": "2026-04-03T20:33:14.5128516+00:00",
    "confirmed_date_delivery": "2026-04-03T20:33:14.5128516+00:00",
    "delivery_db_address_id": "e4a79b6e-6f98-429d-8ca4-122531df065f",
    "approved_by_user_id": "e65c50f1-a31b-4dd3-a824-f36e917125f7",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "e2249fcf-ad0a-4b2e-a2ee-d6fa90d83107",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "b26aa9a7-d3cd-4fab-b714-59ff2f1c49e8",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "8c1730a4-df0b-47e3-95cc-d77b2ae7e99d",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-04-03T20:33:14.5128516+00:00"
  },
  "article_id": "4d310711-c75c-4f5c-a05a-9bae3bbd2f73",
  "article_code": "sample string 5",
  "article": {
    "id": "1f1eeeb2-f548-49e6-b1fd-10bc56bd0d31",
    "article_category_id": "c3e301df-9a84-4fe5-bea2-0b82674ae12d",
    "article_category": {
      "id": "6c84f693-4ff4-40f4-9e7b-bc71ceb4e20c",
      "parent_id": "67dec5f0-f042-4031-86c1-ccb42098e34a",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-04-03T20:33:14.5128516+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "528ce440-1d3d-4411-aea6-1c0bc1b11181",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "7425f256-7932-485e-a5bc-0b0f245708f9",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "90cd487a-cd14-4e59-93a8-29e6a4abd4fa",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "ed5f8d9d-a88f-43e7-990f-4d7f14ffbae1",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "61c4e8fb-576e-4bc7-95d0-d82fe27e3765",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "1fe1db56-2472-42e6-9ed0-e52b3e186efb",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-04-03T20:33:14.5128516+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-04-03T20:33:14.5128516+00:00",
    "date_update": "2026-04-03T20:33:14.5128516+00:00",
    "modified_dateutc": "2026-04-03T20:33:14.5128516+00:00",
    "article_color_id": "c968fd21-a87f-408f-8140-8a60c2c78ec4",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "ab8b1972-c902-4a2c-8767-d8b28851b24b",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-04-03T20:33:14.5128516+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "9a496668-1f6c-4722-9e6b-9995be78b58b",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "4e512f91-9830-4cb3-b5f5-cc5f4b3e249a",
    "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-04-03T20:33:14.5284775+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.