Picture of Placing Orders with our API (RecordOrder)

Placing Orders with our API (RecordOrder)

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 NameData typeDescription
ExternalOrderIdstringExternal Order Id from a third party system (need to be unique per order)
CatfishCustomerIdstringCustomer Guid or CustomerId or CustomerEmail
CatfishDeliveryMethodstringInfigo Delivery Method
IsPaymentPaidboolMark order as paid
PurchaseOrderNumberstringPurchase Order Number
CallbackUrlstringCallback Url
DeliveryAddressAddressDelivery address
BillingAddressAddressBilling address
CheckoutAttributesAttribute[]Checkout attributes
OrderLineItemsOrderlineItem[]Order line Item
ExtraDataobject

PropertyName = ExtraDataName

PropertyValue = ExtraDataValue

CustomTagsCustomTagsOrder Custom tags

 

Custom tags

Property NameData TypeDescription
CustomTag1stringCustom Tag 1
CustomTag2stringCustom Tag 2
CustomTag3stringCustom Tag 3
CustomTag4stringCustom Tag 4

 

Address

Property NameData TypeDescription
FirstNamestringFirst name
LastNamestringLast name
CompanyNamestringCompany Name
AddressLine1stringAddress Line 1
AddressLine2string

Address Line 2

TownstringTown
ZipPostalCodestringZip Postal Code
StateProvincestringState Province
CountrystringCountry
TelephonestringTelephone
FaxNumberstringFax Number
EmailstringAddress Email

 

OrderlineItem

Property NameData TypeDescription
NopProductIdintNop Product Id
QuantityintOrderline quantity
ProductVariantAttributesAttribute[]

Product Attributes

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

PdfExternalUrlstring

Pdf external URL

(Only for Multipart Products)

PdfHashstring

Pdf file hash (MD5)

(Only for Multipart Products)

CustomTagsCustomTags

Orderline custom tags

CustomData1string

Order Custom Data 1

DeliveryTypeDeliveryType[]

Delivery types (optional)

 

Attribute

Property NameData TypeDescription
KeystringAttribute Name
ValuestringAttribute Value

 

DeliveryType

ValueData TypeDescription
"Print"stringPrint delivery type
"Digital"string

Digital delivery type

 

Success Response

Code : 200 OK

{
Property NameData typeDescription
SuccessboolSuccess Flag
CodestringPlace Order status
CatfishOrderIdstringInfigo order id for the new created order
HelpUrlstringAPI Documentation link
MessagestringUser 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 NameData typeDescription
SuccessboolSuccess Flag
CodestringPlace Order status
ContextInfoContextInfoDetails about errors
HelpUrlstringAPI Documentation link
MessagestringHttp Status Code User Friendly

 

Context Info 

Property NameData typeDescription
ErrorListErrorContains all errors that block order to be created

 

Error

Property NameData typeDescription
ErrorMessagestringUser friendly error message
LocationstringSystem error message code
NamestringProperty name
IsBadRequestboolFlag that indicated if this cause a bad request

 

    Was this article helpful? 
     
     0 out of 0 found this helpful
    Have more questions? Submit a request

    0 Comments

    Please sign in to leave a comment.

    Incomplete