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": "2c3b16b0-1dab-4053-908a-4fdfbe0d3157",
  "purchase_order_id": "af31c529-54d9-4fc6-8367-b333105c33d6",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "d4442492-0c4b-4b02-a208-f29f5a640193",
    "id2": 2,
    "jobs_id": "db00a326-9134-474d-a823-f4c61fc4bd25",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "3a61f5c4-52dc-4208-8f7c-f8c2cad25b6e",
    "supplier_company_code": "sample string 6",
    "user_id": "3e58b7df-25d1-466b-8bac-5d6dc942fb97",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2026-08-06T23:22:48.7255881+00:00",
    "date_update": "2026-08-06T23:22:48.7255881+00:00",
    "date_delivery": "2026-08-06T23:22:48.7255881+00:00",
    "confirmed_date_delivery": "2026-08-06T23:22:48.7255881+00:00",
    "delivery_db_address_id": "dcee5a08-6d28-4447-9f58-330e0136820a",
    "approved_by_user_id": "6db750a2-47e0-43bf-9606-713dd54e1cfa",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "c5e9e190-f821-4c83-ba8a-3d1c6b2cad16",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "cb8b618f-9946-4540-a170-b54cc4527d2c",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "21c4cae8-3197-4ecc-a4a4-7f86fb77b1b6",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2026-08-06T23:22:48.7255881+00:00"
  },
  "article_id": "efc0cfc7-bc98-423e-91d8-6780d4687731",
  "article_code": "sample string 5",
  "article": {
    "id": "9d788020-ea30-4b60-9c4f-ab32cf1ea68f",
    "article_category_id": "11758f03-d0fc-4340-b7bd-44e6883f0033",
    "article_category": {
      "id": "05836867-82d4-4722-9ba9-cc1555f5eefe",
      "parent_id": "d5f27b90-1eeb-41a3-bbbf-992804b5e596",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2026-08-06T23:22:48.7255881+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "ae65d141-9573-4fdd-aa3d-c8c197311ad8",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "9484dc97-a6d3-4b98-8034-eb8b9663dc85",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "68a709dc-44c3-4afc-90ba-a954b0017404",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "dcac3970-4b7f-46d8-9b14-1608959c0a9f",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "d39be904-a771-425a-a6a4-90c9c144a3c4",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "06bc8ee7-9c0a-4d1d-8fa1-f3c286a586ea",
    "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-06T23:22:48.7255881+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-06T23:22:48.7255881+00:00",
    "date_update": "2026-08-06T23:22:48.7255881+00:00",
    "modified_dateutc": "2026-08-06T23:22:48.7255881+00:00",
    "article_color_id": "18afb4eb-0ffe-48d5-9e3b-f243c0ba32b1",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "d97cdfd3-7b27-453a-8c6f-fde613b0b7d5",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2026-08-06T23:22:48.7255881+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "6bd73a8a-9082-47aa-8b60-ec33f2e3c306",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "b16e10fd-e8e5-4496-b2e5-cdf337223ec9",
    "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-06T23:22:48.7255881+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.