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": "e1300f40-ef41-4d26-9a34-11ca7facea7f",
  "purchase_order_id": "54b61476-cf5f-42e7-a125-955a30e82025",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "6119453a-34b8-497a-a736-233b7eb7d3c3",
    "id2": 2,
    "jobs_id": "956e3f75-2f08-4f63-9585-3c23b5c17079",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "82cd43ac-871a-4dce-9537-a35062afa5ae",
    "supplier_company_code": "sample string 6",
    "user_id": "53f7370d-059a-4ca5-97f2-fe3c6f8bb81b",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-08-15T11:37:08.9977069+00:00",
    "date_update": "2026-08-15T11:37:08.9977069+00:00",
    "date_delivery": "2026-08-15T11:37:08.9977069+00:00",
    "confirmed_date_delivery": "2026-08-15T11:37:08.9977069+00:00",
    "delivery_db_address_id": "0c90c999-981a-4837-9177-1ccb5c752a01",
    "approved_by_user_id": "eba3444c-623d-4dfe-8eb7-4260a7e0467b",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "9a0973e4-d3d7-4f9a-83eb-45e000d5357a",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "8e1b5273-515a-48bb-a177-27d804c76d65",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "17cbf1ba-dbbc-4830-9d94-7b962eb8bdbc",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-08-15T11:37:08.9977069+00:00"
  },
  "article_id": "13a9620b-f7f1-4324-b8ca-c0244c365c4b",
  "article_code": "sample string 5",
  "article": {
    "id": "92d7c3b4-bf39-48c4-b415-8b8f8f3795ff",
    "article_category_id": "23963206-0b8b-49d4-b432-99bd42720221",
    "article_category": {
      "id": "e729cac8-3242-4cfc-8e92-16e75d76bb05",
      "parent_id": "d18c015f-3603-43ab-a949-1f70dcde046f",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-08-15T11:37:08.9977069+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "24b4b4d2-5a04-4523-835b-545de5a103ed",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "4ade0948-79fd-4582-8245-ea7c166ca70e",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "5fe84dc0-ff27-4845-80ea-bae17c17ec12",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "1c2c6d0d-0d5c-4f0c-b5cd-ad1ce44baff6",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "5c34a43a-fcbb-4298-91bb-e43befc30a8e",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "119d82d4-578b-460e-aa0b-66fd7b090e60",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2026-08-15T11:37:08.9977069+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-08-15T11:37:08.9977069+00:00",
    "date_update": "2026-08-15T11:37:08.9977069+00:00",
    "modified_dateutc": "2026-08-15T11:37:08.9977069+00:00",
    "article_color_id": "6e0d0ece-9b74-4d18-872c-06c5d726f260",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "91cfbd21-41b8-479f-a09a-7f33a311a244",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-08-15T11:37:08.9977069+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "74334b42-1de6-463a-a047-077bb2d59b63",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "bf2f6046-b6e9-4b98-8dbc-9d4f8339bfb7",
    "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-08-15T11:37:08.9977069+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.