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": "95911bf5-b881-4855-8480-b04ebabe67f9",
  "purchase_order_id": "585d627b-1833-497a-a2b7-e71aefc874d7",
  "purchase_order_reference_back_office": "sample string 3",
  "purchase_order": {
    "id": "29ff711f-42b4-4981-90df-7e099c7c3aa5",
    "id2": 2,
    "jobs_id": "5ae4a505-d2ae-4a27-80b9-18ef499f35a9",
    "jobs_reference_back_office": "sample string 4",
    "supplier_company_id": "e9b06791-5fa6-48f3-9ac6-64faa1754feb",
    "supplier_company_code": "sample string 6",
    "user_id": "4f60bd69-3d68-4ddf-b0f2-ce6a4d2e9b0d",
    "user_code": "sample string 8",
    "description": "sample string 9",
    "memo": "sample string 10",
    "total_lines": 11,
    "date_create": "2023-03-18T22:19:12.7820947+00:00",
    "date_update": "2023-03-18T22:19:12.7820947+00:00",
    "date_delivery": "2023-03-18T22:19:12.7820947+00:00",
    "confirmed_date_delivery": "2023-03-18T22:19:12.7820947+00:00",
    "delivery_db_address_id": "45ba8d0e-e64e-4012-8896-e6174f2d1d02",
    "approved_by_user_id": "ef9387aa-59a4-4115-b409-c353263feacc",
    "approved_by_user_code": "sample string 18",
    "technical_user_id": "ca968430-26c0-4ad3-82e0-d776c5d043a8",
    "technical_user_code": "sample string 20",
    "purchase_order_status_id": "28d42e01-08fd-42fd-b922-a243571e20a4",
    "purchase_order_status_code": "sample string 22",
    "article_stock_location_id": "839a2822-6879-44e1-b2b0-a8ebe3618365",
    "is_pickup": true,
    "reference_back_office": "sample string 25",
    "modified_dateutc": "2023-03-18T22:19:12.7977188+00:00"
  },
  "article_id": "6f895698-c0fd-4f9e-8ede-3f8232802b64",
  "article_code": "sample string 5",
  "article": {
    "id": "6299a415-65a1-4bc8-a66e-300d211b713c",
    "article_category_id": "db395e17-bacc-4553-9f7b-c2579cadefa4",
    "article_category": {
      "id": "bb9d6a2b-4e89-45c3-b8c4-83ed1a2ed214",
      "parent_id": "6fc04d00-0767-4f25-bad1-0f606fdb862d",
      "parent_code": "sample string 3",
      "code": "sample string 4",
      "name": "sample string 5",
      "modified_dateutc": "2023-03-18T22:19:12.7977188+00:00"
    },
    "article_category_code": "sample string 3",
    "article_group_1_id": "26c5925e-fb7c-439b-ab6a-ea8ba11251c5",
    "article_group_1_code": "sample string 5",
    "article_group_2_id": "62887774-e58a-482e-83ce-83c9708484c3",
    "article_group_2_code": "sample string 7",
    "article_group_3_id": "07f3ec28-f32a-4f2f-a361-c62d941d542c",
    "article_group_3_code": "sample string 9",
    "article_group_4_id": "5c6c366d-849f-4e6e-98f6-c2006c667d41",
    "article_group_4_code": "sample string 11",
    "article_group_5_id": "328792c4-0841-4fea-b2ff-5a6cb409a020",
    "article_group_5_code": "sample string 13",
    "article_group_6_id": "bec70132-9459-4083-97a2-92e5a67fd81c",
    "article_group_6_code": "sample string 15",
    "physical_stock": 16,
    "back_order_client": 17,
    "back_order_supplier": 18,
    "expected_delivery_date_bo_supplier": "2023-03-18T22:19:12.7977188+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": "2023-03-18T22:19:12.7977188+00:00",
    "date_update": "2023-03-18T22:19:12.7977188+00:00",
    "modified_dateutc": "2023-03-18T22:19:12.7977188+00:00",
    "article_color_id": "9530479f-0c79-4e73-8a2d-c57a82fd7597",
    "article_color_code": "sample string 38",
    "article_color": {
      "id": "d0503f43-1744-4c56-b5ae-b7a5750b59c6",
      "name": "sample string 2",
      "code": "sample string 3",
      "modified_dateutc": "2023-03-18T22:19:12.7977188+00:00"
    },
    "warranty_period_nb_months": 39,
    "use_serial": true,
    "_replace_id": "6126c0b6-2d2d-412c-8740-f953343e7356",
    "replace_article_code": "sample string 42",
    "db_unit_of_measure_id_selling": "d0c54fb1-e6ba-43c4-b7a0-fedd84ff533a",
    "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": "2023-03-18T22:19:12.7977188+00:00"
}

Response Information

Resource Description :

IHttpActionResult

None.

Response Formats

application/json, text/json

Sample:

Sample not available.