Order
Status: Trusted Tester
An order records a sale to a business location. For example requests see the Sales guide.
AG-1234:ORD-1234567Possible values: [orders]
ordersattributes object
The 3 letter currency code as defined by ISO 4217
Possible values: >= 3 characters and <= 3 characters
CADlineItems object[]
The unique identifier of a product, product edition or package. It can be obtained by following this guide.
A-123lineItemlineItemThe number of units to ordered
1The unit price in cents. If not provided the default price for this sku in the marketplace will be used.
0The billing frequency
Possible values: [onetime, monthly, yearly, ``]
Indicates if this lineitem is a package instead of a product or an addon.
Holds the SKU of the package that this lineitem is part of. Products inside of a package do not have pricing so refer to the lineitem of the package SKU to find the price.
MP-123:EDITION-123The status of the order will be automatically set to one of the following by the system:
draft: The order has not yet been sent for approvalsubmitted: The order is ready for approvalprocessing: The order and its items are being processeddeclined: The order has been declined by an admin or a customerfulfilled: The order and its items have been successfully processed. This includes activating the products with the vendor(s).error: One or more of the orders items failed to be processedarchived: The order has been marked as archivedNotReady: The order could not be created as a dependent resource is not yet ready to be used
Possible values: [draft, submitted, processing, declined, fulfilled, error, archived, NotReady]
processingA tag is a label that can be used for grouping and filtering your list of orders. They may be any string upto 30 characters in length.
Possible values: <= 30
Free-text notes associated with the order.
orderForms object[]
Form fields associated with the order, grouped by form. Each entry represents a distinct form:
standard: Vendasta shared fields (business name, address, etc.)admin: Partner/market admin-configured default fieldsorder:<app-id>: App-specific order form fieldsorder:<app-id>:<addon-id>: Addon-specific order form fields
On create/update, only id and value on each field are used. The label, description, and type fields are read-only metadata returned on GET.
Identifies which form this group belongs to. For example: standard, admin, order:MP-abc, or order:MP-abc:addon-123.
order:MP-abcfields object[]required
The unique identifier of the field within its form.
business_nameThe answer or value for this field.
For file fields, provide a plain URL string pointing to any publicly accessible file. The filename will be derived from the URL path. To use Vendasta-hosted file storage, first upload the file to https://order-fulfillment-api-prod.apigateway.co/fulfillment-form/attachments/upload and use the returned URL as the value.
Acme CorpHuman-readable label for the field. Read-only; returned on GET but ignored on create/update.
Description or help text for the field. Read-only.
The input type of the field. Required when creating or updating order forms.
Possible values: [text, textarea, dropdown, checkbox, file, vbcUser]
relationships object
businessLocation object
Required during creation: The business location the order is for
data objectrequired
AG-1234567Possible values: [businessLocations]
businessLocationssalesPerson object
The user who will be credited with the sale. Used to associate orders with salespersons in reports.
Note the user must have the salesperson role.
data objectrequired
U-1234567Possible values: [users]
users{
"id": "AG-1234:ORD-1234567",
"type": "orders",
"attributes": {
"currencyCode": "CAD",
"lineItems": [
{
"sku": "A-123",
"type": "lineItem",
"quantity": 1,
"amount": 0,
"intervalCode": "onetime",
"isPackage": true,
"containedInPackage": "MP-123:EDITION-123"
}
],
"statusCode": "processing",
"tags": [
"string"
],
"notes": "string",
"orderForms": [
{
"id": "order:MP-abc",
"fields": [
{
"id": "business_name",
"value": "Acme Corp",
"label": "string",
"description": "string",
"type": "text"
}
]
}
]
},
"relationships": {
"businessLocation": {
"data": {
"id": "AG-1234567",
"type": "businessLocations"
}
},
"salesPerson": {
"data": {
"id": "U-1234567",
"type": "users"
}
}
}
}