Send an order to your Sophio store via API

INTRODUCTION

Sophio hopes to make automating order fulfillment easy for third party developers no matter where they sell their products online. If you’re interested in becoming a supplier of ours, please email us at support@sophio.com and we’ll get in touch.  Sophio will adapt its platform to a qualified suppliers web service if necessary.  The API documentation below is used typically by 'sellers' and Sophio, not between 'fulfillment provider' and Sophio.  

Sophio API

Our Ordering API is available for any of our stores, and allows for read access to most of the data in your account, and write access to create specific objects, like Orders.  The API is a great way to get data directly to us if you have your own ecommerce store and are not using Sophio’s SaaS platform.

End Point

Each API user must have a Sophio store.  The endpoint is the https version of your stores URL.    For example:  https://demo.sophio.com/ would be the base endpoint.  If you are wanting to send an order to your Sophio store you would use https://demo.sophio.com/createorder.wws?action=CREATE

Authentication

The Sophio API uses a  base 64 encoded api key and private key that are obtained from within your Sophio Advanced Settings Account tab.  Send the Base64 encoded string to the page createorder.wws?action=CREATE&authentication=BASE64ENCODEDSTRINGHERE.  For example, if the API KEY given is 'sophio' and the API Secret is 'orders' then the querystring variable to send would be:  authentication=c29waGlvOm9yZGVycw==  - Sophio will decode this as sophio:orders prior to accepting your order post.

Sample JSON Request 

{
"orderNumber": "296594",
"orderKey": "322759-106515",
"orderDate": "2018-07-17T12:08:06",
"paymentDate": "2018-07-17T12:08:06",
"shipByDate": "2018-07-17T12:08:06",
"orderStatus": "awaiting_shipment",
"customerId": 225846,
"customerUsername": "buyer@gmail.com",
"customerEmail": "buyer@gmail.com",
"billTo": {
"name": "Steve Smith",
"company": "",
"street1": "185 Exchange Blvd",
"street2": "",
"street3": "",
"city": "West Orange",
"state": "NJ",
"postalCode": "07052",
"country": "US",
"phone": "201-731-9692",
"residential": true
},
"shipTo": {
"name": "Steve Smith",
"company": "",
"street1": "185 Airport Exchange Blvd",
"street2": "",
"street3": "",
"city": "West Orange",
"state": "NJ",
"postalCode": "0752",
"country": "US",
"phone": "201-731-9692",
"residential": true
},
"items": [{
"lineItemKey": "222637",
"sku": "VIC-OS32372",
"name": "Engine Oil Pan Gasket fits 2007-2011 Toyota Tundra Land Cruiser",
"imageUrl": "",
"weight": {
"value": 0.37,
"units": "pounds"
},
"quantity": 2,
"unitPrice": 7.46,
"taxAmount": 0,
"shippingAmount": 0,
"warehouseLocation": "Bin",
"options": [{
"name": "size",
"value": ""
}],
"productId": 222637,
"fulfillmentSku": "VIC-OS32372",
"adjustment": false,
"upc": ""
},
{
"lineItemKey": "222638",
"sku": "SNA-3401222",
"name": "Power Steering Pressure Line Hose Assembly fits 2006-2008 Honda Civic",
"imageUrl": "",
"weight": {
"value": 1.72,
"units": "pounds"
},
"quantity": 1,
"unitPrice": 47.46,
"taxAmount": 0,
"shippingAmount": 0,
"warehouseLocation": "Bin",
"options": [{
"name": "size",
"value": ""
}],
"productId": 222638,
"fulfillmentSku": "SNA-3401222",
"adjustment": false,
"upc": ""
}
],
"amountPaid": 66.63,
"taxAmount": 0,
"shippingAmount": 9.25,
"customerNotes": "",
"paymentMethod": "Credit Card",
"requestedShippingService": "Priority Mail",
"carrierCode": "ups",
"serviceCode": "ups_ground",
"packageCode": "package",
"confirmation": "delivery",
"shipDate": "2018-07-17",
"weight": {
"value": 2.0700,
"units": "pounds"
},
"dimensions": {
"units": "inches",
"length": 24,
"width": 8.7500,
"height": 0.1000
},
"AdvancedOptions": {
"warehouseId": "",
"source": "400402",
"storeId": "",
"containsAlcohol": false,
"customField1": "153102358691-1749930787005",
"customField2": "296594",
"billToParty": "",
"billToAccount": "",
"billToPostalCode": "",
"billToCountryCode": "US"
},
"tagIds": [
53974
]
}

Sample JSON Response - Note:The response below will not match the request above because it is an example.  In a real order the data sent would be echo'd back for confirmation.

{
"orderId": 123456,
"orderNumber": "296594",
"orderKey": "322759-106515",
"orderDate": "2018-07-17T12:08:06",
"createDate": "2018-07-17T12:08:06",
"modifyDate": "2018-07-17T12:08:06",
"paymentDate": "2018-07-17T12:08:06",
"shipByDate": "2018-07-25T21:07:51.0000000",
"orderStatus": "awaiting_shipment",
"customerId": null,
"customerUsername": "fbs@sophio.com",
"customerEmail": "fbs@sophio.com",
"billTo": {
"name": "Michael Birnholz",
"company": "Sophio FBS",
"street1": "200 Enterprise Road",
"street2": null,
"street3": null,
"city": "Somerville",
"state": "TN",
"postalCode": "38068",
"country": "US",
"phone": null,
"residential": null,
"addressVerified": null
},
"shipTo": {
"name": "Sanabria Auto Repair",
"company": "",
"street1": "5246 DIVISION AVE S",
"street2": "",
"street3": null,
"city": "KENTWOOD",
"state": "MI",
"postalCode": "49548-5606",
"country": "US",
"phone": null,
"residential": false,
"addressVerified": "Address validated successfully"
},
"items": [{
"orderItemId": 328070751,
"lineItemKey": "224195",
"sku": "DOR-931-861",
"name": "Liftgate Lock Actuator fits 2001-2007 Toyota Sequoia DORMAN",
"imageUrl": null,
"weight": {
"value": 19.20,
"units": "ounces",
"WeightUnits": 1
},
"quantity": 1,
"unitPrice": 51.37,
"taxAmount": 0.00,
"shippingAmount": 0.00,
"warehouseLocation": "Bin",
"options": [{
"name": "size",
"value": ""
}],
"productId": null,
"fulfillmentSku": "DOR-931-861",
"adjustment": false,
"upc": "DOR-931-861",
"createDate": "2018-07-31T04:24:20.917",
"modifyDate": "2018-07-31T04:24:20.917"
}],
"orderTotal": 60.62,
"amountPaid": 60.62,
"taxAmount": 0.00,
"shippingAmount": 9.25,
"customerNotes": "",
"internalNotes": null,
"gift": false,
"giftMessage": null,
"paymentMethod": "Credit Card",
"requestedShippingService": "Priority Mail",
"carrierCode": "ups",
"serviceCode": "ups_ground",
"packageCode": "package",
"confirmation": "none",
"shipDate": "2018-07-25",
"holdUntilDate": null,
"weight": {
"value": 19.20,
"units": "ounces",
"WeightUnits": 1
},
"dimensions": {
"units": "inches",
"length": 6.10,
"width": 4.84,
"height": 3.39
},
"insuranceOptions": {
"provider": null,
"insureShipment": false,
"insuredValue": 0.0
},
"internationalOptions": {
"contents": null,
"customsItems": null,
"nonDelivery": null
},
"advancedOptions": {
"warehouseId": 163700,
"nonMachinable": false,
"saturdayDelivery": false,
"containsAlcohol": false,
"mergedOrSplit": false,
"mergedIds": [],
"parentId": null,
"storeId": 281550,
"customField1": "153108939992-1753237658005",
"customField2": "298232",
"customField3": null,
"source": "374572",
"billToParty": "third_party",
"billToAccount": "320743168",
"billToPostalCode": "37064",
"billToCountryCode": "US",
"billToMyOtherAccount": null
},
"tagIds": [53974],
"userId": null,
"externallyFulfilled": false,
"externallyFulfilledBy": null,
"labelMessages": null
}




Was this answer helpful? 0 Users Found This Useful (0 Votes)