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": "9d877c3d-5e50-4add-b246-27e28498eb54",
  "purchase_order_id": "f82b7218-7cbf-4b04-9433-f01760bbb13b",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "9a1628d2-3114-4f9c-9ee5-622e491c2eff",
    "id2": 2,
    "jobs_id": "61d66f68-1792-4128-9531-35d6edee928c",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "a309d5aa-af2f-4489-9691-7e19b01aef9d",
    "supplier_company_code": "sample string 6",
    "user_id": "581e27df-a259-4ae7-b238-90d6dcca44ab",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-05-29T07:53:46.8071582+00:00",
    "date_update": "2026-05-29T07:53:46.8071582+00:00",
    "date_delivery": "2026-05-29T07:53:46.8071582+00:00",
    "confirmed_date_delivery": "2026-05-29T07:53:46.8071582+00:00",
    "delivery_db_address_id": "12fc3031-6570-4454-9108-7fbb36002c4b",
    "approved_by_user_id": "2517d5cb-6251-48d3-b6d7-e273e630fc28",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "b11614bb-ff5c-4bfe-8d1a-5dfc95ed7ebd",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "68ca4af5-8b17-40d2-9b3a-fbfe3002d00b",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "bdc30d72-9e5b-4d82-a054-05bc3d9b46ea",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-05-29T07:53:46.8071582+00:00"
  },
  "article_id": "0883e9a7-7f7b-470f-94b1-b9f80f963f63",
  "article_code": "sample string 5",
  "article": {
    "id": "12ef8471-e967-4164-944f-a9ee15edfe71",
    "article_category_id": "9607f6ae-d805-4540-b4fe-048226ee2d95",
    "article_category": {
      "id": "2586b322-b8d6-4a79-b3d8-cc00ab60c7fa",
      "parent_id": "719b0f13-bc70-42e8-8eb8-9ac1b0b15af2",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-05-29T07:53:46.8071582+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "899a42bd-4dde-4fd2-9097-274ba42c7b65",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "0b5761fe-e14d-4b6d-ad4d-4a32ddca1582",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "d186c574-27a0-4983-ac51-325b92002339",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "a6cf52d1-6756-44e4-9d7b-a31d7705dd4f",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "e6da238f-f5ab-48c2-bc34-8ce8debfa869",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "e605e020-4197-4e4a-b37c-8ace84c1de55",
    "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-29T07:53:46.8071582+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-29T07:53:46.8071582+00:00",
    "date_update": "2026-05-29T07:53:46.8071582+00:00",
    "modified_dateutc": "2026-05-29T07:53:46.8071582+00:00",
    "article_color_id": "d2789c1e-5455-4b2d-9f4e-f163a23573a9",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "b3d96010-4f3a-4d2d-a4fa-d0bb38d2a5d6",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-05-29T07:53:46.8071582+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "46f180dc-a7b3-4bd2-917f-ae5c50ee5a46",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "7d1658aa-35ea-4875-ab24-3764370b0c69",
    "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-29T07:53:46.8071582+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.