Skip to content

Create purchaseorder

Request

Creates a new Purchaseorder record. Purchaseorder resource in the Animal Health Data Store

Security
bearer
Path
siteIdnumberrequired

Site identifier

Bodyapplication/jsonrequired
clientIdstring

Client associated with this purchase order, if applicable.

Example:"123e4567-e89b-12d3-a456-426614174000"
commentsstring

Free-text comments on the purchase order.

Example:"example"
extensionsobject

Vendor- or practice-specific extensions.

freightAmountstring

Freight amount as a decimal string.

Example:"100.00"
freightTaxAmountstring

Tax amount applicable to freight.

Example:"100.00"
isActivebooleanrequired

Whether the purchase order is active.

Example:true
orderDatestringrequired

Calendar date of the purchase order.

Example:"2025-01-01"
ownershipIdstring

Ownership or business unit identifier associated with this purchase order.

Example:"123e4567-e89b-12d3-a456-426614174000"
purchaseOrderItemIdsArray of strings

List of purchase order item identifiers associated with this purchase order.

purchaseorderIdstring

Canonical identifier for the purchase order.

Example:"123e4567-e89b-12d3-a456-426614174000"
shippingAddressIdstring

Reference to the shipping address resource.

Example:"123e4567-e89b-12d3-a456-426614174000"
statusstringrequired

Status of the purchase order.

Enum:"draft""submitted""confirmed""partiallyReceived""received""cancelled"
Example:"draft"
supplierAccountNumberstring

Account number with the supplier.

Example:"example"
supplierIdstringrequired

Supplier from whom the order is placed.

Example:"123e4567-e89b-12d3-a456-426614174000"
supplierOrderNumberstring

Supplier-provided order number.

Example:"123e4567-e89b-12d3-a456-426614174000"
taxAmountstring

Total tax amount for the purchase order.

Example:"100.00"
totalAmountstring

Total amount for the purchase order including tax.

Example:"100.00"
curl -i -X POST \
  'https://docs.axiomera.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/purchaseorder' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "clientId": "123e4567-e89b-12d3-a456-426614174000",
    "comments": "example",
    "extensions": {},
    "freightAmount": "100.00",
    "freightTaxAmount": "100.00",
    "isActive": true,
    "orderDate": "2025-01-01",
    "ownershipId": "123e4567-e89b-12d3-a456-426614174000",
    "purchaseOrderItemIds": [
      "string"
    ],
    "purchaseorderId": "123e4567-e89b-12d3-a456-426614174000",
    "shippingAddressId": "123e4567-e89b-12d3-a456-426614174000",
    "status": "draft",
    "supplierAccountNumber": "example",
    "supplierId": "123e4567-e89b-12d3-a456-426614174000",
    "supplierOrderNumber": "123e4567-e89b-12d3-a456-426614174000",
    "taxAmount": "100.00",
    "totalAmount": "100.00"
  }'

Responses

Purchaseorder created successfully

Bodyapplication/json
clientIdstringrequired

Client associated with this purchase order, if applicable.

Example:"123e4567-e89b-12d3-a456-426614174000"
commentsstringrequired

Free-text comments on the purchase order.

Example:"example"
createdAtstring, (date-time)required

Timestamp when the purchase order was created.

Example:"2025-01-01T00:00:00.000Z"
extensionsobjectrequired

Vendor- or practice-specific extensions.

freightAmountstringrequired

Freight amount as a decimal string.

Example:"100.00"
freightTaxAmountstringrequired

Tax amount applicable to freight.

Example:"100.00"
isActivebooleanrequired

Whether the purchase order is active.

Example:true
orderDatestring, (date-time)required

Calendar date of the purchase order.

Example:"2025-01-01T00:00:00Z"
ownershipIdstringrequired

Ownership or business unit identifier associated with this purchase order.

Example:"123e4567-e89b-12d3-a456-426614174000"
purchaseOrderItemIdsArray of stringsrequired

List of purchase order item identifiers associated with this purchase order.

purchaseorderIdstringrequired

Canonical identifier for the purchase order.

Example:"123e4567-e89b-12d3-a456-426614174000"
shippingAddressIdstringrequired

Reference to the shipping address resource.

Example:"123e4567-e89b-12d3-a456-426614174000"
statusstringrequired

Status of the purchase order.

Enum:"draft""submitted""confirmed""partiallyReceived""received""cancelled"
Example:"draft"
supplierAccountNumberstringrequired

Account number with the supplier.

Example:"example"
supplierIdstringrequired

Supplier from whom the order is placed.

Example:"123e4567-e89b-12d3-a456-426614174000"
supplierOrderNumberstringrequired

Supplier-provided order number.

Example:"123e4567-e89b-12d3-a456-426614174000"
taxAmountstringrequired

Total tax amount for the purchase order.

Example:"100.00"
totalAmountstringrequired

Total amount for the purchase order including tax.

Example:"100.00"
updatedAtstring, (date-time)required

Timestamp when the purchase order was last modified.

Example:"2025-01-01T00:00:00.000Z"
Response
{ "clientId": "123e4567-e89b-12d3-a456-426614174000", "comments": "example", "createdAt": "2025-01-01T00:00:00.000Z", "extensions": {}, "freightAmount": "100.00", "freightTaxAmount": "100.00", "isActive": true, "orderDate": "2025-01-01T00:00:00Z", "ownershipId": "123e4567-e89b-12d3-a456-426614174000", "purchaseOrderItemIds": [ "string" ], "purchaseorderId": "123e4567-e89b-12d3-a456-426614174000", "shippingAddressId": "123e4567-e89b-12d3-a456-426614174000", "status": "draft", "supplierAccountNumber": "example", "supplierId": "123e4567-e89b-12d3-a456-426614174000", "supplierOrderNumber": "123e4567-e89b-12d3-a456-426614174000", "taxAmount": "100.00", "totalAmount": "100.00", "updatedAt": "2025-01-01T00:00:00.000Z" }