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": "e67a0eae-20d7-47bd-9371-bd9147588051",
  "purchase_order_id": "705e73d9-f582-4659-8a07-4748a5b13542",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "2ad06219-f8f9-4a3a-b730-f7ad3893027a",
    "id2": 2,
    "jobs_id": "049c270e-cfe4-45bd-822b-8c27b8bc74cd",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "ecab750b-97bb-451a-b179-d9dafdd40211",
    "supplier_company_code": "sample string 6",
    "user_id": "0d5563a6-00e3-480d-a7cc-1a3ff051ddb4",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2025-03-23T21:14:43.4378621+00:00",
    "date_update": "2025-03-23T21:14:43.4378621+00:00",
    "date_delivery": "2025-03-23T21:14:43.4378621+00:00",
    "confirmed_date_delivery": "2025-03-23T21:14:43.4378621+00:00",
    "delivery_db_address_id": "b1c5cbe7-9df5-42a1-97e9-64a1cbeb84d5",
    "approved_by_user_id": "2b991b36-34df-45e5-8226-919a0840261b",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "31b95cc5-1c55-4db3-acf6-3d7d3d2331ce",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "7db5446e-da37-47c1-bb43-6e33e925d2c2",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "6f3b3dce-a291-4740-b64f-2f7d5378fa42",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2025-03-23T21:14:43.4378621+00:00"
  },
  "article_id": "ed1c261b-5fe5-4e1e-ba4f-6424431558f4",
  "article_code": "sample string 5",
  "article": {
    "id": "84c8d2d5-e74c-47c2-907a-e392a4207531",
    "article_category_id": "8a2f7ef3-01ee-4da2-ab5f-2cf290849ea6",
    "article_category": {
      "id": "86af7a00-6cb7-46e1-8e0b-0512c8430490",
      "parent_id": "a7086341-6987-4546-bb7b-3787407b4fdb",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2025-03-23T21:14:43.4378621+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "a1a126b1-86d6-46e3-af11-0501cf00a0fa",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "d2034019-722f-4161-99dc-8180afa44c9c",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "0ffca8cd-b297-4849-8edc-651d0b15693c",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "487a32ba-e8fa-4498-b47a-57f266ab9b29",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "62b3d6d9-4961-45b1-819f-810fd23d6526",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "599ca8bb-82a5-4531-93c2-54b82c4dce76",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2025-03-23T21:14:43.4378621+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": "2025-03-23T21:14:43.4378621+00:00",
    "date_update": "2025-03-23T21:14:43.4378621+00:00",
    "modified_dateutc": "2025-03-23T21:14:43.4378621+00:00",
    "article_color_id": "e4d430d4-71c0-4035-8d53-9427fd62100e",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "f48a4495-f1aa-46e4-8f8f-1bab845a66ce",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2025-03-23T21:14:43.4378621+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "698671cf-fd4c-43a9-bb65-d16ad2b30b24",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "0c0a507e-6bc8-42fd-b155-d5885f2fc0a4",
    "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": "2025-03-23T21:14:43.4378621+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.