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": "bcdc8f61-97ca-407b-8c07-2c44595b330c",
  "purchase_order_id": "bd3e710a-93c2-4ba0-a944-a66b798093d2",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "691e976d-ca5b-4b8a-9037-e111fa7083a3",
    "id2": 2,
    "jobs_id": "ff272200-6855-4a0c-983f-67b8a16d5e73",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "42b64ba3-1f6a-4de8-a26d-eb501bc9f5ed",
    "supplier_company_code": "sample string 6",
    "user_id": "ad1d8e5c-6e8e-4668-9799-4afd7f0ccfc1",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-05-21T15:48:09.815404+00:00",
    "date_update": "2026-05-21T15:48:09.815404+00:00",
    "date_delivery": "2026-05-21T15:48:09.815404+00:00",
    "confirmed_date_delivery": "2026-05-21T15:48:09.815404+00:00",
    "delivery_db_address_id": "a90d1781-4e3f-46b5-aa0e-486987868e93",
    "approved_by_user_id": "574837e4-5342-4b09-87b6-5fbfa94d5917",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "af85b43c-eeea-4d26-9b90-2ffa84d48d4c",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "8e88f3e1-c544-49f0-b135-c9e63966341c",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "6f840d1f-557a-4869-b9a8-4871a9b53d78",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-05-21T15:48:09.815404+00:00"
  },
  "article_id": "5b6979d6-1724-49f0-9de9-7b5371691c6c",
  "article_code": "sample string 5",
  "article": {
    "id": "20d1721c-09a7-4f7f-88cb-d56230bdbaeb",
    "article_category_id": "76cf1233-8983-4c87-bd67-696c6b938b29",
    "article_category": {
      "id": "ff9d2620-09c9-4f7b-b1d7-8639552680aa",
      "parent_id": "ec236218-6450-4506-ae4b-db39a8912eab",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-05-21T15:48:09.815404+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "6ca137f5-6d31-49e9-9460-4b262e168cf0",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "6a567296-9147-412a-a5ee-55394c209bfd",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "147f818f-a875-4747-b920-43d71b2d884f",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "7693c8f7-3944-4289-b81c-ce87d00c4c8a",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "e58e841d-5cfd-4652-b485-9b40bfe6c895",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "405b45ec-6d1d-463c-969c-621e61a598b3",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-05-21T15:48:09.815404+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-05-21T15:48:09.815404+00:00",
    "date_update": "2026-05-21T15:48:09.815404+00:00",
    "modified_dateutc": "2026-05-21T15:48:09.815404+00:00",
    "article_color_id": "077c8904-a30f-4026-9e28-0fba419c7255",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "1d2475c4-6fb2-4b22-83a4-1f5ffb85ba23",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-05-21T15:48:09.815404+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "a681e183-c9ab-486a-9dfc-b60255ec356d",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "cde589b7-f7ad-4313-b508-0cc566b12d42",
    "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-05-21T15:48:09.815404+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.