Purchase Orders API

Purchase Orders

API Description

This API allows the customer to manage Purchase Orders with Tenaris. Purchase Orders represent the formal business documents between the customer and Tenaris.

| Operation | Description | Specification |

| GET /purchase-orders | Retrieve all purchase orders | GET |

| POST /purchase-orders | Create a new purchase order | POST |

Environments

Static mock:

URL https://customerapi-dev.azure-api.net/public/purchase-orders

Sandbox:

URL https://customerapi-dev.azure-api.net/sb/purchase-orders

Production:

URL https://customerapi-dev.azure-api.net/purchase-orders

Get Purchase Orders

curl -X GET "https://customerapi-dev.azure-api.net/sb/purchase-orders?pageSize=10&pageNumber=1" \

-H "Authorization: Bearer {access_token}"

Response:

{

"page": {"pageSize": 10, "pageNumber": 1, "pageLimit": 2, "code": 200},

"results": [

{

"id": "PO-0001234",

"customerReference": "REF-2024-001",

"status": "CONFIRMED",

"createdDate": "2024-01-10T08:00:00Z",

"totalItems": 5,

"currency": "USD"

}

]

}

Create Purchase Order

curl -X POST https://customerapi-dev.azure-api.net/sb/purchase-orders \

-H "Authorization: Bearer {access_token}" \

-H "Content-Type: application/json" \

-d '{

"customerReference": "REF-2024-002",

"shipToParty": {"id": "30004"},

"requestedDeliveryDate": "2024-08-01",

"items": [

{

"product": {"id": "21336"},

"quantity": 200,

"uom": "ST",

"requestedDate": "2024-08-01"

}

]

}'

Response (201 Created):

{

"id": "PO-0001235",

"status": "PENDING",

"customerReference": "REF-2024-002",

"createdDate": "2024-03-15T14:20:00Z"

}

Errors

| ERROR | DESCRIPTION |

| 400 | VALIDATION ERROR. Missing or invalid required fields. |

| 401 | ERROR IN TOKEN VALIDATION. There is an issue with the token used in the request. |

| 403 | USER NOT AUTHORIZED. There is an error in the credentials. |

| 404 | PAGING PARAMETERS ERROR. Bad request. |

| 500 | GENERAL ERROR. Server side error. |