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": "55333585-0dc5-47c6-816a-8bdb2e08638e",
  "purchase_order_id": "6c31788c-b1f6-411f-acd8-79262c3c693a",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "c8c6c148-5ca7-469a-86f2-4db00da10a06",
    "id2": 2,
    "jobs_id": "852d6d43-5d9e-4b3a-94ff-7446f2693af3",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "76977802-d053-4d12-9cbe-127eda4a6ce7",
    "supplier_company_code": "sample string 6",
    "user_id": "b9241b78-d959-4660-b350-f23db226d162",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-11-12T18:46:09.4175474+00:00",
    "date_update": "2026-11-12T18:46:09.4175474+00:00",
    "date_delivery": "2026-11-12T18:46:09.4175474+00:00",
    "confirmed_date_delivery": "2026-11-12T18:46:09.4175474+00:00",
    "delivery_db_address_id": "ae0aa20a-edd3-40f5-808a-7c805cb152d2",
    "approved_by_user_id": "921fcdf0-ba49-4edd-978c-101571deb72d",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "3e0b1d3f-07e8-45b8-88fb-7c7751a90a7f",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "de38f0e6-19d3-4a99-9785-e96e7755cb7b",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "89c1da2b-c7c1-442d-837c-bb60ee03cc80",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-11-12T18:46:09.4175474+00:00"
  },
  "article_id": "5e58008f-1b58-4a38-839d-38e0cb9b7ee0",
  "article_code": "sample string 5",
  "article": {
    "id": "f2f2cc64-7c71-46b8-9154-95028f34f302",
    "article_category_id": "ae45b860-3a86-446b-9127-20894bd7bf5e",
    "article_category": {
      "id": "7011a724-8f76-44d9-ac74-2eec835fb07c",
      "parent_id": "63dd500a-af85-439e-b87c-42260db46c71",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-11-12T18:46:09.4175474+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "5671bc45-30db-4b1c-ac55-33b0c39fe230",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "f08877be-6298-4e65-a8a0-d96f7cdfe1cc",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "8adf7299-b6cd-45a5-9bfe-327c0935d2e4",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "76401268-924d-4d80-896d-83f6663ea437",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "bfdc9c4e-a683-46c2-b16e-b23045101a97",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "77615806-21a6-408e-8628-4f3477b959ae",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-11-12T18:46:09.4175474+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-11-12T18:46:09.4175474+00:00",
    "date_update": "2026-11-12T18:46:09.4175474+00:00",
    "modified_dateutc": "2026-11-12T18:46:09.4175474+00:00",
    "article_color_id": "563afa50-be72-4b64-aa7d-e92fe7b8eab4",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "2e08b52f-0860-4ef9-96e8-de0c1ddd9aaf",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-11-12T18:46:09.4175474+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "d6e34ab4-33fa-4379-9220-9f5d1fe836f9",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "148871d1-e576-4a21-9d5c-9de7dff68a30",
    "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-11-12T18:46:09.4175474+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.