External orders
A brief summary of the support Centara has for external orders into Centara.
Prerequisites
The support for external orders is fairly tightly coupled with Centara, as the controller expects that the referenced store, any customers on the order, items sold, as well as tenders (payments) used already exist in Centara.
API endpoint
The order controller is available on the Centara instance as endpoint api/order. For incoming orders there is a single HTTP POST endpoint that accepts an Order object (see below) which returns an OrderResponse object back. See below for documentation on the Order and OrderResponse objects. In case of errors, the service returns standard HTTP error codes.
Data structures
Order
Field
R
Type
Description
OrderId
Guid
Unique id for the order in Centara. Generated by Centara
StoreId
y
int
Identifier of the store that fulfills the order.
Created
y
DateTime
When was the order created
DueAt
DateTime
When will the customer pick up the order
ReferenceNumber
string(20)
External reference. For example id of the order in the external system.
Language
string(3)
Which language should be used when communicating with the customer, e.g. in any email communication used.
Notes
string(max)
Freeform text which is persisted with the order
Status
OrderStatus
Set by Centara. See values below.
Flags
OrderFlags
Only used for partially paid orders. See below
Customer
Customer
Information on the customer, if any
LoyaltyInstrument
LoyaltyInstrument
Loyalty instrument information
Items
y
OrderItem[]
A list of items in the order
Payments
OrderPayment[]
A list of payments
InfoCodes
InfoCode[]
A list of info codes
OrderResponse
Field
R
Type
Description
OrderId
Guid
A reference to the order as created in Centara
Customer
Field
R
Type
Description
CustomerId
y
string(24)
Id of customer
ExternalId
string(24)
Id of customer in external system
Title
string(10)
Title
FirstName
string(64)
First name
MiddleNames
string(64)
Middle names
LastName
string(64
Last name
EmailAddress
string(128)
E-mail address
PhoneHome
string(32)
Home phone number
PhoneMobile
string(32)
Mobile phone number
Addresses
CustomerAddress[]
Addresses of customer
CustomerAddress
Field
R
Type
Description
CustomerId
string(24)
Customer id
AddressTypeId
int
A reference to a type (customizable)
Address
AddressType
Address information
AddressType
Field
R
Type
Description
AddressId
int
Address id
Address
string(512)
Address
PostalAddress
string(128)
Postal address / zip code
Country
string(64)
Country
LoyaltyInstrument
Field
R
Type
Description
InstrumentId
string(20)
Loyalty instrument id
OrderItem
Field
R
Type
Description
ItemId
y
string(24)
Item id
Quantity
y
decimal
Item quantity
Price
y
decimal
Item price
Discount
decimal
Discount given
OriginalPrice
decimal
Item price, excluding discount
Description
string(80)
Item description
LinkedItems
LinkedOrderItem[]
A list of linked items (subitems)
LinkedOrderItem
Identical to OrderItem, except there is no LinkedItems array
OrderPayment
Field
R
Type
Description
Amount
y
decimal
Payment amount
TimeStamp
y
DateTime
DateTime of payment
TenderCode
y
int
Reference to tender type
Description
string(20)
Payment description
Authorization
OrderyPaymentAuthorization
Authorization of payment.
InfoCodes
InfoCode[]
Info codes with they payment, if any
InfoCode
Field
R
Type
Description
Id
y
string(200)
Info code id
Value
y
string(max)
Info code value
Description
string
Info code description (not for input, only output)
AddedBy
string(500)
Reference to who/what added the infocode
AddedTimestamp
DateTime
DateTime the info code was added
OrderPaymentAuthorization
Field
R
Type
Description
TransactionDateTime
y
DateTime
DateTime of authorization
AuthorisationCode
y
string
Authorisation code from external authorization provider
HostTransactionNumber
string
Reference number from external authorization provider
Provider
string
Name of external authorization provider
CardSchemeName
string
Card information
OrderStatus enum
Value
Description
0
Unknown status
1
Active, unpaid
2
Active, partly paid
3
Active, fully paid
4
Closed
5
Deleted
6
Ready for pickup, unpaid
7
Ready for pickup, partly paid
8
Ready for pickup, fully paid
9
Deleted (automatically)
OrderFlags enum
Value
Description
0
Unknown
15
Partially paid
Samples
Posting a new order
Accessing previously posted orders
This can be done either via the returned order reference, or via the external reference previously sent in https://<centaraserverurl>/api/order/f92babb6-ca13-413f-9b84-6ac7072697ca https://<centaraserverurl>/api/order/SHOPIFY-0001
Last updated
Was this helpful?