Function: CreateOrUpdatePurchaseOrders
The CreateOrUpdatePurchaseOrders function creates or updates purchase orders. If you use a payee ID that does not exist in the system, a new payee will be created.
- EAT Encryption Additional Terms parameter: None
- API version: V6
The following is a sample SOAP 1.2 request and response. In the request, you need to replace the data types in yellow with actual values.
SOAP 1.2: Request
POST /v6/payerfunctions.asmx HTTP/1.1
Host: api.tipalti.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateOrUpdatePurchaseOrders xmlns="http://Tipalti.org/">
<payerName>string</payerName>
<timestamp>double</timestamp>
<key>string</key>
<purchaseOrders>
<TipaltiPurchaseOrderItem>
<Idap>string</Idap>
<PurchaseOrderNumber>string</PurchaseOrderNumber>
<Status>string</Status>
<Memo>string</Memo>
<PurchaseOrderDate>dateTime</PurchaseOrderDate>
<PayerEntity>string</PayerEntity>
<Currency>string</Currency>
<Approvers>
<TipaltiInvoiceApprover>
<Name>string</Name>
<Email>string</Email>
<Order>integer</Order>
</TipaltiInvoiceApprover>
</Approvers>
<CustomFields>
<KeyValuePair>
<Key>string</Key>
<Value>string</Value>
</KeyValuePair>
</CustomFields>
<PurchaseOrderLines>
<PurchaseOrderLine>
<Item>string</Item>
<Quantity>decimal</Quantity>
<Units>string</Units>
<LineDescription>string</LineDescription>
<Rate>decimal</Rate>
<Amount>decimal</Amount>
<DiscountValue>decimal</DiscountValue>
<NetValue>decimal</NetValue>
<Account>string</Account>
<TaxAmount>decimal</TaxAmount>
<CustomFields>
<KeyValuePair>
<Key>string</Key>
<Value>string</Value>
</KeyValuePair>
</CustomFields>
<PoLineId>string</PoLineId>
<LineType>string</LineType>
<BilledQuantity>decimal</BilledQuantity>
<BilledAmount>decimal</BilledAmount>
<AccountExternalID>string</AccountExternalID>
<ItemExternalID>string</ItemExternalID>
<IsClosed>boolean</IsClosed>
<TaxCodeExternalId>string</TaxCodeExternalId>
<UnitsExternalId>string</UnitsExternalId>
</PurchaseOrderLine>
<PurchaseOrderLine>
<Item>string</Item>
<Quantity>decimal</Quantity>
<Units>string</Units>
<LineDescription>string</LineDescription>
<Rate>decimal</Rate>
<Amount>decimal</Amount>
<DiscountValue>decimal</DiscountValue>
<NetValue>decimal</NetValue>
<Account>string</Account>
<TaxAmount>decimal</TaxAmount>
<CustomFields>
<KeyValuePair>
<Key>string</Key>
<Value>string</Value>
</KeyValuePair>
</CustomFields>
<PoLineId>string</PoLineId>
<LineType>string</LineType>
<BilledQuantity>decimal</BilledQuantity>
<BilledAmount>decimal</BilledAmount>
<AccountExternalID>string</AccountExternalID>
<ItemExternalID>string</ItemExternalID>
<IsClosed>boolean</IsClosed>
<TaxCodeExternalId>string</TaxCodeExternalId>
<UnitsExternalId>string</UnitsExternalId>
</PurchaseOrderLine>
</PurchaseOrderLines>
</TipaltiPurchaseOrderItem>
</purchaseOrders>
</CreateOrUpdatePurchaseOrders>
</soap12:Body>
</soap12:Envelope>
SOAP 1.2: Response
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<CreateOrUpdatePurchaseOrdersResponse xmlns="http://Tipalti.org/">
<CreateOrUpdatePurchaseOrdersResult>
<errorMessage>string</errorMessage>
<errorCode>string</errorCode>
<b>boolean</b>
<i>integer</i>
<d>double</d>
<s>string</s>
<PurchaseOrderErrors>
<TipaltiPurchaseOrderItemResult>
<ErrorMessage>string</ErrorMessage>
<Succeeded>boolean</Succeeded>
<PurchaseOrderNumber>string</PurchaseOrderNumber>
</TipaltiPurchaseOrderItemResult>
<TipaltiPurchaseOrderItemResult>
<ErrorMessage>string</ErrorMessage>
<Succeeded>boolean</Succeeded>
<PurchaseOrderNumber>string</PurchaseOrderNumber>
</TipaltiPurchaseOrderItemResult>
</PurchaseOrderErrors>
</CreateOrUpdatePurchaseOrdersResult>
</CreateOrUpdatePurchaseOrdersResponse>
</soap12:Body>
</soap12:Envelope>
Request parameters
element |
description |
limitation |
Mandatory? |
data type |
---|---|---|---|---|
payerName | The name of the payer, as assigned by Tipalti |
|
Mandatory | string |
timestamp |
Current time (UTC) when the request is sent |
Unix time | Mandatory | double |
key | Encryption key | Mandatory | string | |
purchaseOrders |
|
Mandatory | Array of Tipalti Purchase OrderItem |
TipaltiPurchaseOrderItem
element |
description |
limitation |
Mandatory? |
data type |
---|---|---|---|---|
Idap | Unique payee identifier (the payee ID) |
|
Optional | string |
PurchaseOrderNumber | An identifier for the purchase order | Mandatory | string | |
Status | Status of the purchase order |
|
Optional | string |
Memo | Description of the purchase order | Mandatory | string | |
PurchaseOrderDate | Date and time the purchase order was created | YYYY-MM-DDThh:mm:ss, where T indicates the start of the time section | Mandatory | dateTime |
PayerEntity | Payer entity linked to this transaction |
|
Mandatory, if more than one payer entity has been defined in Tipalti | string |
Currency | Currency of the vendor | Length = 3 (per ISO 4217) | Mandatory | string |
Approvers | List of bill approvers | Optional | Array of TipaltiInvoice Approver |
|
CustomFields |
|
|
Optional | Array of KeyValuePair |
PurchaseOrderLines |
|
Array of PurchaseOrder Line |
TipaltiInvoiceApprover
element |
Description |
Mandatory? |
Data Type |
---|---|---|---|
Name | Name of bill approver | Optional | string |
Email address of bill approver | Optional | string | |
Order |
|
Optional | integer |
KeyValuePair
Element |
description |
Mandatory? |
data type |
---|---|---|---|
Key | Name of field | Optional | string |
Value | Value of field | Optional | string |
PurchaseOrderLine
Element |
description |
limitation |
Mandatory? |
Data type |
---|---|---|---|---|
Item | Code for the purchase order line | Mandatory | string | |
Quantity | Quantity of the purchase order line | Max. of four decimal places | Mandatory | decimal |
Units | Units of measurement for the purchase order line (e.g., kilograms, pounds, etc.) | Optional | string | |
LineDescription | Description of the purchase order line | Optional | string | |
Rate | Price of a single line item | Max. of four decimal places | Mandatory | decimal |
Amount | Amount of the purchase order line (Rate × Quantity) | Max. of four decimal places | Mandatory | decimal |
DiscountValue | Value of the discount received from the vendor |
|
Optional | decimal |
NetValue | Net value of the purchase order line (i.e., the Amount including any discounts) | Max. of four decimal places | Optional | decimal |
Account | GL account external reference identifier | Mandatory, if more than one GL account has been defined in Tipalti | string | |
TaxAmount | Amount of tax (or VAT) calculated for the purchase order line | Max. of four decimal places | Optional | decimal |
CustomFields | If custom fields have been defined for the purchase order line entity, the values of these fields can be set here. |
Valid value types:
|
Optional | Array of KeyValuePair |
PoLineId |
|
Optional | string | |
LineType | The type of purchase order line | Valid values:
|
Mandatory | string |
BilledQuantity | Quantity billed for the purchase order line | Mandatory | decimal | |
BilledAmount | Amount billed for the purchase order line | Mandatory | decimal | |
AccountExternalID | An ID that uniquely identifies the GL account (e.g., in NetSuite, it is the "Internal ID") | Mandatory | string | |
ItemExternalID | An ID that uniquely identifies the purchase order line | Mandatory | string | |
IsClosed | If True, the PO line will not be used for matching | Mandatory | boolean | |
TaxCodeExternalId | The external ID of the relevant tax code for the PO line (refer to the CreateOrUpdateTaxCodes API where the external ID is used to create/ update tax codes) | Optional | string | |
UnitsExternalId |
The unit identifier in the payer's ERP |
Optional | string |
Response parameters
element |
description |
data type |
---|---|---|
CreateOrUpdatePurchaseOrdersResult | Contains the response parameters | CreateOrUpdatePurchaseOrderResult (extension of type TipaltiResponse) |
CreateOrUpdatePurchaseOrderResult
element |
description |
Limitation |
data type |
---|---|---|---|
errorMessage | A description of the error | See API error codes. | string |
errorCode | The status of the error | See API error codes. | string |
b | If the return code is Boolean, this parameter will carry the value. | boolean | |
i | If the return code is integer, this parameter will carry the value. | integer | |
d | If the return code is double, this parameter will carry the value. | double | |
s | If the return code is string, this parameter will carry the value. | string | |
PurchaseOrderErrors |
|
Array of TipaltiPurchase OrderItemResult |
TipaltiPurchaseOrderItemResult
element |
description |
data type |
---|---|---|
ErrorMessage | A description of the error | string |
Succeeded | Indicates if the purchase order line was created or updated successfully | boolean |
PurchaseOrderNumber | An identifier for the purchase order | string |