Centara
  • Introduction to Centara
  • Getting started with Centara
    • Software and hardware requirements
    • getCentara.exe
    • Install Centara Server
    • Centara Configuration
      • RDM overview
      • Create organization structure
      • General settings
      • Layouts and visual components
        • Creating layouts
        • Assigning layouts in configuration
        • Populating layouts with components
        • Applying functionalty to buttons
        • UI component reference
      • Hardware
        • OPOS installation
          • Epson OPOS
        • Centara server configuration
      • POS Receipts
        • Receipt parts
        • Receipt Directives
          • Formatting directives
          • General directives
          • Hospitality directives
          • Fiscal Printers directives
          • Tender slip directives
        • Receipt logo
        • Receipt template
          • Special formatting
      • POS operators and permissions
        • Create operators and permissions
      • Tenders
      • Other configuration
        • Customer configuration
        • Cash management
          • Setting up cash management
          • Balance report
        • Suspend / retrieve
        • Search
          • Applying customer search
          • Applying product search
            • Style search
            • Stock search
          • Applying transaction search
        • Custom settings
    • Install Centara POS
      • Alternative database configurations
      • Centara Licensing
    • Features
      • Conditional sub-layouts
      • Out of stock warning
  • User guides
    • POS User Guide
      • Operator sign on / off
      • Layouts
      • Selling products
      • Paying for products
      • Voiding
      • Customers
      • Suspend / retrieve
      • Cash management
    • Discount Offer module
      • Getting started
      • Basic discounts
      • Package deals
      • Seasonal offers
      • Miscellaneous
      • Working with the filters
      • Making changes to the discounts
      • Time restrictions
      • Selectors
      • Layered discounts
      • Audit Log
      • Glossary of Terms
    • Loyalty system
      • System overview
      • Creating organization stucture
      • Working with loyalty data
        • General handling
          • Adding loyalty data
        • Giftcards
          • Adding gift card data
        • Store credit
          • Instrument handling
        • Coupons
          • How to setup alphanumeric offer coupon
      • Connecting Centara to Loyalty
      • View loyalty data on POS
      • Loyalty operations
    • Snippet manager
  • Integrations
    • Sentry.io
    • Acumatica
      • Acumatica installation
      • Acumatica Connector
        • Customer creation
        • Cashier Groups
        • Avalara Configuration
        • Common configuration errors
        • General inquiries
  • Development
    • APIs
      • External orders
      • Item API
      • Loyalty API
        • Gift cards
        • Loyalty cards
        • Store credit
    • GraphQL
    • XVal
      • XVal List comprehensions
      • XVal operators
      • XVal examples
      • XVal usage
      • XVal testing
  • References
    • Data processes
      • XVal Library
      • Data process examples
    • POS macros
  • FAQ
    • Centara Server
      • Installation
      • Maintenance
    • Centara POS
Powered by GitBook
On this page
  • Prerequisites
  • API endpoint
  • Data structures
  • Order
  • OrderResponse
  • Customer
  • CustomerAddress
  • AddressType
  • LoyaltyInstrument
  • OrderItem
  • LinkedOrderItem
  • OrderPayment
  • InfoCode
  • OrderPaymentAuthorization
  • OrderStatus enum
  • OrderFlags enum
  • Samples
  • Posting a new order
  • Accessing previously posted orders

Was this helpful?

  1. Development
  2. APIs

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

POST /mysite/api/order HTTP/1.1 Host: centara.wise-cloud.com Content-Type: application/json

{
    "StoreId": 1,
    "ReferenceNumber": "SHOPIFY-0001",
    "Created": "2017-10-31T15:30:24Z",
    "Customer": {
        "CustomerId": "0001-01564",
        "FirstName": "Birgir",
        "LastName": "Kristmannsson",
        "PhoneHome": "8221824",
        "EmailAddress": "bk@centara.com"
    },
    "Items": [
        {
            "ItemId": "12269319",
            "Quantity": 3,
            "Price": "70",
            "Description": "Financiers Chocolate"
        },
        {
            "ItemId": "12278428",
            "Quantity": 1,
            "Price": "4000",
            "Description": "NESPRS Ritual Discovery Box Full (5Pc)XI"
        }
    ],
    "Payments": [
        {
            "Amount": "4210",
            "TimeStamp": "2017-10-31T15:28:24Z",
            "TenderCode": "10",
            "Description": "peningar"
        }
    ],
    "InfoCodes": [
        {
            "Id": "Kennitala",
            "Value": "0408695069"
        },
        {
            "Id": "Skóstærð",
            "Value": "44"
        }
    ]
}

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

PreviousAPIsNextItem API

Last updated 3 years ago

Was this helpful?