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": "fe65f448-fc22-4321-8063-2cdfca8d8488",
  "purchase_order_id": "8b28ab87-d3d6-4440-a495-38c2f5ff8a41",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "0db8db04-f394-4461-8371-2314913412f8",
    "id2": 2,
    "jobs_id": "791c466f-8976-493c-a7e0-60a45b2adfd6",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "0cfd3e70-3582-4480-9cad-35eefca50155",
    "supplier_company_code": "sample string 6",
    "user_id": "00266726-5348-4927-856a-6d80f5f93a61",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-10-15T05:57:41.2740606+00:00",
    "date_update": "2026-10-15T05:57:41.2740606+00:00",
    "date_delivery": "2026-10-15T05:57:41.2740606+00:00",
    "confirmed_date_delivery": "2026-10-15T05:57:41.2740606+00:00",
    "delivery_db_address_id": "7574e799-339a-4945-a2f5-bd13bfb99d7d",
    "approved_by_user_id": "9e215df5-4ff2-49ee-ae56-7a64aecc475c",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "3d45c214-49ce-4f10-9c83-43c7398e4f42",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "f2265d27-559f-4622-b29e-5e81108ae034",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "262ccba7-fce6-4e93-9451-1c3ae691967c",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-10-15T05:57:41.2740606+00:00"
  },
  "article_id": "b2efa403-f9e5-4fcd-aa56-2c035a9290c3",
  "article_code": "sample string 5",
  "article": {
    "id": "d097e585-9e0b-48cb-95d7-78986dcd277b",
    "article_category_id": "314c2ce7-07f6-47f1-84f9-a7988e4bf941",
    "article_category": {
      "id": "7803689a-7e84-465f-a1a4-2f44967c1ebf",
      "parent_id": "d9feea1f-0181-4688-9660-0c5bb72a08fb",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-10-15T05:57:41.2938503+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "acc8e19a-75fc-452a-a9d0-3db3f6a442f1",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "4fa60902-136b-41b8-80b5-d05ca3df750a",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "b07c902f-100a-49a9-a152-f2c4fd2a363a",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "2d8ebb5c-3882-4d10-a9da-c23069daba57",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "aa1babbd-9a97-4fdf-bf4e-6323049b73ab",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "7b705349-66e3-4d57-b046-e31dd317f921",
    "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-15T05:57:41.2938503+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-15T05:57:41.3053457+00:00",
    "date_update": "2026-10-15T05:57:41.3053457+00:00",
    "modified_dateutc": "2026-10-15T05:57:41.3053457+00:00",
    "article_color_id": "9f819aca-ff60-498f-a79b-6ba02d7e8dc5",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "ff356dec-c410-470d-b1b5-baed3c11aad4",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-10-15T05:57:41.3053457+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "1aa241d7-8885-47bf-93dd-6ca501ea26a7",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "117626f1-eef8-48a9-a645-8d11ed895d5e",
    "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-15T05:57:41.3053457+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.