Not logged in - Login
< back

Order API Interface Specification

Table of Content

  1. Introduction
    1. Overview
    2. How to send requests
  2. Basic Concepts
    1. Message Transport
    2. Authentication
  3. JSON Message
    1. ORD_AuthenticationRQ/RS
      1. Support Operations
      2. Business Rules
      3. ORD_AuthenticationRQ
      4. Sample Call Url Request
      5. ORD_AuthenticationRS
      6. Sample Message Response Success
      7. Sample Message Response Not Success
    2. ORD_GetOrderRQ/RS
      1. Support Operations
      2. Business Rules
      3. ORD_GetOrderRQ
      4. Sample Call Url Request
      5. ORD_GetOrderRS
      6. Sample Message Response
    3. ORD_GetCustomerRQ/RS
      1. Support Operations
      2. Business Rules
      3. ORD_GetCustomerRQ
      4. Sample Call Url Request
      5. ORD_GetCustomerRS
      6. Sample Message Response
      7. Sample Message Response Not Success
    4. ORD_UpdateOrderRQ/RS
      1. Support Operations
      2. Business Rules
      3. ORD_UpdateOrderRQ
      4. Sample Call Url Request
      5. ORD_UpdateOrderRS
      6. Sample Message Response
    5. ORD_ErrorRS
      1. ORD_ErrorRS 'Status' Values List

1 Introduction

1.1 Overview

The use of this interface for communication with the exPub Service Providers using Call URL over a HTTPS protocol. The interface supports the exchange of:

  • Order List
  • Customer Information

1.2 How to send requests

Test environment data response: https://api.expubwebsites.net/OrderApi/GetOrder?test=true (Get Order List)
https://api.expubwebsites.net/OrderApi/GetInformationCustomer?test=true (Get Customer Information)

The addresses to which to send requests are the following: https://api.expubwebsites.net/OrderApi/Authentication?token={token get from Service Providers} (Check Authentication)
https://api.expubwebsites.net/OrderApi/GetOrder?token={token get from Service Providers} (Get Order List)
https://api.expubwebsites.net/OrderApi/GetInformationCustomer?token={token get from Service Providers}&order_id={order_id} (Get Customer Information)
https://api.expubwebsites.net/OrderApi/UpdateOrder?token={token get from Service Providers}&{Parameter} (Update Order)

You must send your token and parameter request. This can be achieved through various programming methods, which will vary according to the programming language you're using. API will return json string to your program.

2. Basic Concepts

2.1 Message Transport

All messages are transported via HTTPS GET/POST.

2.2 Authentication

The OrderAPI provides the credentials necessary for consuming the WebServices being offered to the receiving system. Security credentials consist of: Token – A login for authentication that is provided by the OrderAPI at the time of the order e.g. the requesting system should have the ability to connect to different URLs. Connections to the different servers may use the same account information

3 JSON Message

3.1 ORD_AuthenticationRQ/RS

This message identifies the initial request for checking authentication.

3.1.1 Support Operations

Portal requests information about the authentication.

3.1.2 Business Rules

This message is only sent from the portal to the Service Providers. Only requests received via GET/POST method will be accepted.

3.1.3 ORD_AuthenticationRQ

This message identifies the initial request for order data. Using this message the requester may retrieve status authentication.

ParameterRequired(R)
Optional(O)
NotesData Type/ Possible values
tokenRA reference for additional message identification, assigned by the requesting host system. When a request message includes an echo token the corresponding response message include an echo token with the identical valueString Length:1 -128

3.1.4 Sample Call Url Request

https://api.expubwebsites.net/OrderApi/Authentication?token=340FDFAE958CD5335A8CD22B390A6F76497ED23BFBBC877467

3.1.5 ORD_AuthenticationRS

The ORD_AuthenticationRS is the message used to indicate the status of processing the ORD_AuthenticationRQ message. This message returns json that meet the requested criteria and/or Warnings, or Errors if the request did not succeed.

Element(E)NameNotesData Type/ Possible values
EAPIAPI NameString Length:1 -20
EVersionThe message version indicated by a decimal value.Decimal
ETokenA reference for additional message identification, assigned by the requesting host system. When a request message includes an echo token the corresponding response message include an echo token with the identical valueString Length:1 -128
EStatusIdentifies the status of the call url request.Integer
EMessageMessage call url request of statusString Length: 1 - 500
ERequestDate RequestTimeStamp

3.1.6 Simple Message Response Success

{"API":"ORD_Authentication","Version":"0.1","Token":"340FDFAE958CL5335A8CD22B390A6F76497ED23BFBAC877467","Status":2,"Message":"Authentication Success","Request":"2015-06-11T09:56:12.6124108+07:00"}

3.1.6 Simple Message Response Not Success (Wrong Token)

{"API":"ORD_Authentication","Version":"0.1","Token":"340FDFAE958CD5335A8CD22B390A6F76497ED23BFBAC87746","Status":6,"Message":"Error Authentication Wrong Token !","Request":"2015-06-11T10:00:01.5397846+07:00"}

3.2 ORD_GetOrderRQ/RS

This message identifies the initial request for order data.

3.2.1 Support Operations

Portal requests information about the order

3.2.2 Business Rules

This message is only sent from the portal to the Service Providers. Only requests received via GET/POST method will be accepted.

3.2.3 ORD_GetOrderRQ

This message identifies the initial request for order data. Using this message the requester may retrieve a list of order

ParameterRequired(R)
Optional(O)
NotesData Type/ Possible values
tokenRA reference for additional message identification, assigned by the requesting host system. When a request message includes an echo token the corresponding response message include an echo token with the identical valueString Length:1 -128
start_dateOformat dateString / (yyyy-MM-dd)
end_dateOformat dateString / (yyyy-MM-dd)