Skip to content

Latest commit

 

History

History
162 lines (135 loc) · 5.08 KB

orders.md

File metadata and controls

162 lines (135 loc) · 5.08 KB

Fy! Chatbot API - Order

Overview

The Fy! Chatbot API allows to retrieve latest information about the order.

URI scheme

  • Host: marketplace-api.iamfy.co
  • Scheme: HTTPS

Content type

  • Consumes: application/json
  • Returns: application/json

Operations


Paths

GET /v0/chatbot/orders

Returns order with specified order-id and postcode parameters.

Operation getOrder
Method GET
Endpoint /v0/chatbot/orders

Parameters

Type Name Description Schema
Query order-id
required
Order id. string
Query postcode
required
The postcode must match the postcode on the order. string

Responses

An example of a successful response from the getOrder operation:

{"data": {
  "orderReference": "SO-1234",
  "productName": "Flower print",
  "status": "shipped",
  "isPoD": false,
  "deliveryAddressCountry": "UK",
  "shippedOn": "2021-04-08T00:00:00.00Z",
  "courier": "dhl",
  "deliveryStatus": "in-transit",
  "deliveryMessage": "On its way to the courier",
  "deliveryStatusTime": "2021-04-10T21:59:00Z",
  "trackingUrl": "http://webtrack.dhlglobalmail.com/?mobile=&trackingnumber=123ABC",
  "discountApplied": "20%",
  "hasDiscountApplied": true,
  "originalPrice": "£10.00",
  "pricePaid": "£8.00",
  "orderProcessingDays": 2,
  "orderLines": [{
    "orderLineId": 1234,
    "productName": "Flower print",
    "quantity": 1,
    "discountApplied": "20%",
    "hasDiscountApplied": true,
    "originalPrice": "£10.00",
    "pricePaid": "£8.00",
    "orderProcessingDays": 2,
    "shipments": [{
        "courier": "dhl",
        "shippedOn": "2021-04-08T00:00:00.00Z",
        "deliveryStatus": "InTransit",
        "deliveryMessage": "On its way to the courier",
        "deliveryStatusTime": "2021-04-10T21:59:00Z",
        "trackingUrl": "http://webtrack.dhlglobalmail.com/?mobile=&trackingnumber=123ABC"
      }]
    }]
  }
}
Status Description Schema
200 Success. GetOrderResponse
400 Missing or invalid parameters. GetOrderResponse
403 Access forbidden. GetOrderResponse
404 Not Found. GetOrderResponse
500 Server error. GetOrderResponse

Definitions

GetOrderResponse

{"data": <Order>} | <Errors>
View descriptions
Name Description Schema
payload
optional
The payload for the getOrder operation. Order
errors
optional
One or more unexpected errors which occurred during the getOrder operation. -

Order

{"orderReference"         <string>
 "productName"            <string>
 "status"                 <string>
 "isPoD"                  <boolean>
 "deliveryAddressCountry" <string>
 "shippedOn"              <string>
 "courier"                <string>
 "deliveryStatus"         <string>
 "deliveryMessage"        <string>
 "deliveryStatusTime"     <string>
 "trackingUrl"            <string>
 "discountApplied"        <string>
 "hasDiscountApplied"     <boolean>
 "originalPrice"          <string>
 "pricePaid"              <string>
 "orderProcessingDays"    <number>
 }
View descriptions
Name Description Schema
orderReference
required
The reference for a specific Fy! order: an "SO-" prefix followed by a series of numbers. string
productName
optional
The name of the product associated with the order. string
status
required
The order's current status. Available statuses:
- pending,
- cancelled,
- shipped
string
isPoD
required
Flag to indicate if order has PoD products or not. boolean
deliveryAddressCountry
required
The recipient's country. string
shippedOn
optional
The (ISO-8601) datetime when the order was shipped. string
courier
optional
Courier name. string
deliveryStatus
optional
Current status of the delivery. string
deliveryMessage
optional
The latest checkpoint message. string
deliveryStatusTime
optional
The latest checkpoint (ISO-8601) datetime. string
trackingUrl
optional
Official tracking url of the courier. string
discountApplied
optional
Discount applied to the order. string
hasDiscountApplied.
optional
Flag to indicate whether a discount was applied to the product when ordered.
originalPrice.
optional
The retail price of the product at the point it was ordered by the customer.
pricePaid.
optional
The price the customer paid when ordering the product.
orderProcessingDays.
optional
Typical/expected number of days for the order to be processed. number