Placing Orders with our API (RecordOrder)

Overview

RecordOrder API Endpoint allow you to place order in Infigo from a third party system.

Please ensure you have read through our setting up our API articles.

 

URL : /services/api/order/RecordOrder

Method : POST

Auth required: YES

Sample: https://www.yourdomain.com/services/api/order/RecordOrder

Request data:


{
  "ExternalOrderId": "1",
  "CatfishCustomerId": "1",
  "CatfishDeliveryMethod": "First Class",
  "IsPaymentPaid": "true",
  "PurchaseOrderNumber": "123456",
  "CallbackUrl": "www.test.r?asd=a&asd2=b",
  "DeliveryAddress": {
    "FirstName": "FirstName",
    "LastName": "LastName",
    "AddressLine1": "AddressLine1",
    "AddressLine2": "AddressLine2",
    "Town": "Town",
    "ZipPostalCode": "ZipPostalCode",
    "Country": "United Kingdom",
    "Email": "email@test.com",
    "StateProvince": "London"
  },
  "BillingAddress": {
    "FirstName": "FirstName",
    "LastName": "LastName",
    "AddressLine1": "AddressLine1",
    "AddressLine2": "AddressLine2",
    "Town": "Town",
    "ZipPostalCode": "ZipPostalCode",
    "Country": "United Kingdom",
    "Email": "email@test.com",
    "StateProvince": "Devon"
  },
  "CheckoutAttributes": [
    {
      "Key": "OrderAttribute",
      "Value": "Test Checkout Attribute FROM API"
    }
  ],
  "OrderLineItems": [
    {
      "NopProductId": "1",
      "PdfExternalUrl": "http://www.pdf995.com/samples/pdf.pdf",
      "PdfHash": "8BD6509ABA6EAFE623392995B08C7047",
      "Quantity": "500",
"DeliveryType": [], "ProductVariantAttributes": [] }, { "NopProductId": "2", "Quantity": "500", "ProductVariantAttributes": [ { "Key": "First Attribute", "Value": "Black" } ] } ], "ExtraData": { "extraDataName": "extraDataValue" } }

Request data

Property Name Data type Description
ExternalOrderId string External Order Id from a third party system (need to be unique per order)
CatfishCustomerId string Customer Guid or CustomerId or CustomerEmail
CatfishDeliveryMethod string Infigo Delivery Method
IsPaymentPaid bool Mark order as paid
PurchaseOrderNumber string Purchase Order Number
CallbackUrl string Callback Url
DeliveryAddress Address Delivery address
BillingAddress Address Billing address
CheckoutAttributes Attribute[] Checkout attributes
OrderLineItems OrderlineItem[] Order line Item
ExtraData object

PropertyName = ExtraDataName

PropertyValue = ExtraDataValue

CustomTags CustomTags Order Custom tags

 

Custom tags

Property Name Data Type Description
CustomTag1 string Custom Tag 1
CustomTag2 string Custom Tag 2
CustomTag3 string Custom Tag 3
CustomTag4 string Custom Tag 4

 

Address

Property Name Data Type Description
FirstName string First name
LastName string Last name
CompanyName string Company Name
AddressLine1 string Address Line 1
AddressLine2 string

Address Line 2

Town string Town
ZipPostalCode string Zip Postal Code
StateProvince string State Province
Country string Country
Telephone string Telephone
FaxNumber string Fax Number
Email string Address Email

 

OrderlineItem

Property Name Data Type Description
NopProductId int Nop Product Id
Quantity int Orderline quantity
ProductVariantAttributes Attribute[]

Product Attributes

Product group attributes if product is a part of a group. Or Product Variant Attributes

PdfExternalUrl string

Pdf external URL

(Only for Multipart Products)

PdfHash string

Pdf file hash (MD5)

(Only for Multipart Products)

CustomTags CustomTags

Orderline custom tags

CustomData1 string

Order Custom Data 1

DeliveryType DeliveryType[]

Delivery types (optional)

 

Attribute

Property Name Data Type Description
Key string Attribute Name
Value string Attribute Value

 

DeliveryType

Value Data Type Description
"Print" string Print delivery type
"Digital" string

Digital delivery type

 

Success Response

Code : 200 OK

{
"Success": true,
"Code": "success",
"HelpUrl": "http://api.islcatfish.com/Docs",
"Message": " successfully created. RecordOrder with Id {OrderId}. The order has been successfully placed.",
"CatfishOrderId": "76995"
}

Response data

Property Name Data type Description
Success bool Success Flag
Code string Place Order status
CatfishOrderId string Infigo order id for the new created order
HelpUrl string API Documentation link
Message string User friendly message

 

Error Response

Code : 400 Bad Request

Condition: If record order payload is not validated

Content:


{
  "Success": false,
  "Code": "bad_request",
  "ContextInfo": {
    "ErrorList": [
      {
        "ErrorMessage": "The provided customer id is not valid",
        "Location": "noMatch_catfishCustomerId",
        "Name": "CatfishCustomerId",
        "IsBadRequest": true
      }
    ]
  },
  "HelpUrl": "http://api.islcatfish.com/Docs",
  "Message": "BAD_REQUEST"
}

 

Response data

Property Name Data type Description
Success bool Success Flag
Code string Place Order status
ContextInfo ContextInfo Details about errors
HelpUrl string API Documentation link
Message string Http Status Code User Friendly

 

Context Info 

Property Name Data type Description
ErrorList Error Contains all errors that block order to be created

 

Error

Property Name Data type Description
ErrorMessage string User friendly error message
Location string System error message code
Name string Property name
IsBadRequest bool Flag that indicated if this cause a bad request

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.