v1

latestOpenAPI 3.0.3Apache 2.02026-08-062991191002.1 KB
Purchase

Retrieves a Purchase resource.

Retrieves a Purchase resource.

get/purchases/{id}

Path parameters

idstring required

Resource identifier

Response

Purchase resource

idstring

Unique identifier for this purchase note that no particular pattern in this field is guaranteed, only that this field is unique e.g: "stripe-5050"

integrationstring

The key of the integration source e.g. "quickbooks", or "xero"

paymentTypestring nullable

Payment type e.g: "CreditCard"

accountIdstring

ID of account associated with purchase e.g: "1057"

currencystring nullable

Currency code e.g. USD

txnDatestring nullable

Transaction date e.g. "2019-08-25"

totalAmountinteger

Total amount purchased in cents e.g. 450000

createdstring date-time nullable

Date entry was created e.g. "2019-08-25T02:17:40.080Z"

modifiedstring date-time nullable

Date purchase was last modified e.g. "2019-08-26T02:17:40.080Z"

srcIdstring

The unique identifier of the source 3rd party integration e.g. "GH2JK-67283H-YW82KHX-2883KK-KS78S"

customerIdstring nullable

Id of the customer who made the purchase e.g. "C056"

namestring nullable

Name of the purchase e.g. "purchase name"

statusstring nullable

Status of the product e.g. "shipped"

quantityinteger nullable

Quantity purchased e.g. 10

amountPerUnitstring nullable

Amount per unit e.g. "450"

txnIdstring nullable

Transaction Id e.g. "4560"

accountNamestring nullable

Name of the account associated with the purchase e.g. "Cool Cars"

invoiceIdstring nullable

ID of the invoice associated with the purchase e.g. "9870028192"

contactIdstring nullable

Id of the contact which is usually a payee e.g. "23"

contactNamestring nullable

Name of the contact which is usually a payee e.g. "Cool Cars"

contactTypestring nullable

Type of the contact which can be customer, vendor, or employee

paymentMethodIdstring nullable

Reference to the related Payment Method object

Example response

{
  "id": "stripe-5050",
  "integration": "quickbooks",
  "paymentType": "CreditCard",
  "accountId": "1057",
  "currency": "USD",
  "txnDate": "2019-08-25",
  "totalAmount": 450000,
  "created": "2019-08-25T02:17:40.080Z",
  "modified": "2019-08-26T02:17:40.080Z",
  "srcId": "GH2JK-67283H-YW82KHX-2883KK-KS78S",
  "customerId": "C056",
  "name": "purchase name",
  "status": "shipped",
  "quantity": 10,
  "amountPerUnit": "450",
  "txnId": "4560",
  "accountName": "Cool Cars",
  "invoiceId": "9870028192",
  "contactId": "23",
  "contactName": "Cool Cars",
  "contactType": "Vendor",
  "paymentMethodId": "1d80716b-427e-4cad-80c6-c4b3a18eb23d"
}