Merchanter API
The Merchanter API is a RESTful service to facilitate integration between Merchanter and other systems
Introduction
TheMerchanter API is a RESTful service to facilitate integration betweenMerchanter and other client systems.
Authentication
Atthe time of writing this document, the Merchanter API service uses basic authentication.This allows the clients to authenticate themselves by providing a username andpassword in the Authorization HTTP header.
Resources
Theservice exposes a number of resources. A resource represents a collection ofitems on which one or more operations can be defined. The resources availableare as follows: -
- Accounts– user accounts
- CustomerAccounts– customer accounts
- Depots– branches, quays, and warehouse stores
- Products– products
- Sales– sales orders
- Stock– depot stock summaries
Operations
Content Types
GEToperations can send data in either XML (the default) or JSON format. If JSON isrequired, the request must be sent with an Accept HTTP header and thevalue “application/json”.
POST/PUToperations can receive data in either XML (the default) or JSON format. If JSONis required, the request must be sent with a Content-Type HTTP headerand the value “application/json”.
Endpoints
TheURL of every endpoint always starts with a base url:-
{Merchanter application url}/rest/api.merch/v1
Onlythe relative URL is shown for each endpoint.
Accounts
· GEToperations
o /Accounts/me – Retrieveinformation relating to the current user account
§ Parameters – none
§ Response schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
FullName |
String |
200 |
Full name of the user account |
{ "FullName": "", “EmailAddress”: “”, "IsLocalUser": false, "IsMultiLedgerUser": false, "IsSharedLogin": false, "Name": "", "IsWebServiceUser": false } |
EmailAddress |
String |
200 |
|
|
IsLocalUser |
Boolean |
|
Is this a local (normal login) user account? |
|
IsMultiLedgerUser |
Boolean |
|
Do we need to show the name of the user’s ledger in the user profile on screen? |
|
IsSharedLogin |
Boolean |
|
User account to be accessed from a shared terminal? |
|
Name |
String |
100 |
Shorter name of the user account |
|
IsWebServiceUser |
Boolean |
|
Is this a web service user account? |
CustomerAccounts
· GEToperations
o /CustomersAccounts –Retrieve information relating to customer accounts under thecurrent user account’s ledger
· HTTPheader type
o If-Modified-Since – a UTCtimestamp (format ‘yyyy-MM-dd HH:mm:ss’). Only customer accounts that have beencreated or modified since this timestamp will be returned
· Querytype
o Where– a filter expression string with ANDed filters. Available filters are
§ HasParent – does the customer accounthave a parent account? true/false
§ IsDefaultCurrency – is the customeraccount in home currency? true/false
§ IsEcommerceDepot – does the customeraccount belong to an ecommerce depot? true/false
E.g.Where=HasParent==false&&IsDefaultCurrency==true&&IsEcommerceDepot==true
o page – page number. Up to100 customer accounts will be returned per call when the page parameter is usede.g. page=1.
§ Response schema & body(JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
Code |
String |
50 |
Customer account code |
[ { "Code": "", "Name": "", "CreditLimit": 0.00, "OnOrderValue": 0.00, "LedgerBalance": 0.00, "UnpostedPaidValue": 0.00, "CreditStatus": "", "CreditMessage": "", "PaymentTerms": { "DaysToPaymentDue": 0, "MonthsToPaymentDue": 0, "MonthlyAccount": false, "PaymentTermsBasis": "" }, "SalesRep": { "Name": "", "ShortName": "" }, "Depot": { "Code": "", "IsEcommerceDepot": false }, "VATCode": "", "AccountType": "", "OrderReferenceEssential": false, "AgedBalanceCurrent": 0.00, "AgedBalanceMonth1": 0.00, "AgedBalanceMonth2": 0.00, "AgedBalanceMonth3": 0.00, "AgedBalanceMonth4": 0.00, "CustomerPricingType": { "Name": "", "Code": "" }, "SalesContact": { "EmailAddress": "" }, "InvoicingAddress": { "AddressLine1": "", "AddressLine2": "", "City": "", "PostalCode": "", "PhoneNumber": "", "Country": { "Country_ISO3166_1": { "CountryCode_2": "" } } }, "DeliveryAddresses": [ { "AddressLine1": "", "AddressLine2": "", "City": "", "PostalCode": "", "PhoneNumber": "", "Country": { "Country_ISO3166_1": { "CountryCode_2": "" } } } ], "changedDate": "1900-01-01T00:00:00.000Z" } ] |
Name |
String |
60 |
Customer account name |
|
CreditLimit |
Decimal |
|
Credit limit |
|
OnOrderValue |
Decimal |
|
Gross sales value sum (including VAT) of all uninvoiced orders less any payments made |
|
LedgerBalance |
Decimal |
|
Current account balance of the sales ledger |
|
UnpostedPaidValue |
Decimal |
|
Total amount of unallocated cash payments not yet posted to the sales ledger |
|
CreditStatus |
String |
|
Credit status – In_Credit, Warning, Over_Credit, On_Hold, On_Stop, Cancelled |
|
CreditMessage |
String |
100 |
|
|
VATCode |
String |
1 |
Customer VAT type – C (EC Sales), E (Export), G (Group), H (Home sales), I (Internal), X (Exempt) |
|
AccountType |
String |
|
Account type – Account, CashOnly, Internal, TradeCountereCashSale, Commission |
|
OrderReferenceEssential |
Boolean |
|
Does the customer require a reference number against each order? |
|
AgedBalanceCurrent |
Decimal |
|
Aged debt balance – current period |
|
AgedBalanceMonth1 |
Decimal |
|
Aged debt balance – previous period |
|
AgedBalanceMonth2 |
Decimal |
|
Aged debt balance – 2 periods ago |
|
AgedBalanceMonth3 |
Decimal |
|
Aged debt balance – 3 periods ago |
|
AgedBalanceMonth4 |
Decimal |
|
Aged debt balance – 4 periods ago & earlier |
|
changedDate |
Datetime |
|
Date & time of last update |
|
PaymentTerms |
|
|
|
|
- DaysToPaymentDue |
Integer |
|
Number of days till payment due |
|
- MonthsToPaymentDue |
Integer |
|
Number of months till payment due |
|
- MonthlyAccount |
Boolean |
|
Monthly account terms? |
|
- PaymentTermsBasis |
String |
|
Payment terms basis – Days, Months, MonthsPlusDays |
|
SalesRep |
|
|
|
|
- Name |
String |
40 |
Full name of sales rep |
|
- ShortName |
String |
20 |
Shorter name of sales rep |
|
Depot |
|
|
|
|
- Code |
String |
2 |
Depot code |
|
- IsEcommerceDepot |
Boolean |
|
Ecommerce depot? |
|
CustomerPricingType |
|
|
|
|
- Name |
String |
200 |
Customer price band name |
|
- Code |
String |
2 |
Customer price band code |
|
SalesContact |
|
|
|
|
- EmailAddress |
String |
200 |
|
|
InvoicingAddress |
|
|
|
|
- AddressLine1 |
String |
30 |
|
|
- AddressLine2 |
String |
30 |
|
|
- City |
String |
30 |
|
|
- PostalCode |
String |
10 |
|
|
- PhoneNumber |
String |
30 |
|
|
- Country |
|
|
|
|
- - Country_ISO3166_1 |
|
|
|
|
- - - CountryCode_2 |
String |
2 |
ISO 3166-1 country code |
|
DeliveryAddresses (array) |
|
|
|
|
- AddressLine1 |
String |
30 |
|
|
- AddressLine2 |
String |
30 |
|
|
- City |
String |
30 |
|
|
- PostalCode |
String |
10 |
|
|
- PhoneNumber |
String |
30 |
|
|
- Country |
|
|
|
|
- - Country_ISO3166_1 |
|
|
|
|
- - - CountryCode_2 |
String |
2 |
ISO 3166-1 country code |
o /CustomerAccounts/Prices –Retrieve customer special pricing information for products under the current user account’s ledger
§ Parameters
· Querytype
o Where – a filter expressionstring with ANDed filters. Available filters are
§ HasParent – does the customer accounthave a parent account? true/false
§ IsDefaultCurrency – is the customeraccount in home currency? true/false
§ IsEcommerceDepot – does the customeraccount belong to an ecommerce depot? true/false
§ IsSpecial – is the product a special?true/false
§ SellOnline – is this an ecommerceproduct? true/false
E.g.Where=HasParent==false&&IsDefaultCurrency==true&&IsEcommerceDepot==true&&IsSpecial==false&&SellOnline==true
o page – page number. Up to100 customer account special prices will be returned per call when the pageparameter is used e.g. page=1.
§ Response schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
CustomerCode |
String |
50 |
Customer account code |
[ { "CustomerCode": "", "ProductCode": "", "Price": 0.00 } ] |
ProductCode |
String |
20 |
Product code |
|
Price |
Decimal |
|
Nett special price (per stock unit of measure) for this customer account and product |
o /CustomerAccounts/Transactions– Retrieve information for customer account transactions (invoices, creditnotes) under the current user account’s ledger
§ Parameters
· HTTPheader type
o Date-From – a UTCtimestamp (format ‘yyyy-MM-dd HH:mm:ss’). Only customer account transactionswith a transaction date on or after this timestamp will be returned
o If-Modified-Since – a UTCtimestamp (format ‘yyyy-MM-dd HH:mm:ss’). Onlycustomer account transactions that have been created or modified since thistimestamp will be returned
· Querytype
o Where – a filterexpression string with ANDed filters. Available filters are
§ IsDefaultCurrency – is the customeraccount in home currency? true/false
§ IsEcommerceDepot – does the customeraccount belong to an ecommerce depot? true/false
E.g.Where=IsDefaultCurrency==true&&IsEcommerceDepot==true
o page – page number. Up to100 customer account transactions will be returned per call when the pageparameter is used e.g. page=1.
§ Response schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
Type |
String |
|
Transaction type – Sales_Invoice, Sales_Credit |
[ { "Type": "", "Date": "1900-01-01T00:00:00.000Z", "Reference": "", "TotalValue": 0.00, "AmountPaid": 0.00, "AmountOutstanding": 0.00, "CustomerAccount": { "Code": "" }, "Invoice": { "DueDate": "1900-01-01T00:00:00.000Z ", "Dispatch": { "SalesOrder": { "OrderNumberWithSuffix": "", "CustomerReference": "", "Depot": { "Code": "" } } } }, "CreditNote": { "Invoice": { "Dispatch": { "SalesOrder": { "OrderNumberWithSuffix": "", "CustomerReference": "", "Depot": { "Code": "" } } } } } } ] |
Date |
Datetime |
|
Transaction date (UTC) |
|
Reference |
String |
30 |
Transaction reference number |
|
TotalValue |
Decimal |
|
Total transaction amount (inc. VAT) |
|
AmountPaid |
Decimal |
|
|
|
AmountOutstanding |
Decimal |
|
|
|
CustomerAccount |
|
|
|
|
- Code |
String |
50 |
Customer account code |
|
Invoice |
|
|
Invoice information when type = Sales_Invoice |
|
- DueDate |
Datetime |
|
Payment due date |
|
- Dispatch |
|
|
|
|
- - SalesOrder |
|
|
|
|
- - - OrderNumberWithSuffix |
String |
30 |
Display representation of the internal order number (inc. suffix) |
|
- - - CustomerReference |
String |
200 |
Reference number as supplied by the customer |
|
- - - Depot |
|
|
|
|
- - - - Code |
String |
2 |
Supplying depot code |
|
CreditNote |
|
|
Credit note information when type = Sales_Credit |
|
- Invoice |
|
|
Invoice to be credited |
|
- - Dispatch |
|
|
|
|
- - - SalesOrder |
|
|
|
|
- - - - OrderNumberWithSuffix |
String |
30 |
Display representation of the internal order number (inc. suffix) |
|
- - - - CustomerReference |
String |
200 |
Reference number as supplied by the customer |
|
- - - - Depot |
|
|
|
|
- - - - - Code |
String |
2 |
Supplying depot code |
· POSToperations
o /CustomerAccounts/Payments– Create a new customer account payment
Attribute Name |
Data Type |
Max Length |
Required |
Notes |
Request Body (JSON) |
CustomerCode |
String |
50 |
Yes |
Customer account code |
{ “CustomerCode”: ””, “PaymentAmount”: 0.00, “PaymentDate”: ”1900-01-01T00:00:00.000Z”, “PaymentMethod”: ””, “PaymentReference”: “” } |
PaymentAmount |
Decimal |
|
Yes |
Total amount paid |
|
PaymentDate |
Datetime |
|
No |
Date of payment (UTC) – if not supplied, current date will be assumed |
|
PaymentMethod |
String |
20 |
Yes |
Tender type code |
|
PaymentReference |
String |
20 |
Yes |
|
The successful response schema & body (JSON) is as follows: -
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
_ID |
String |
20 |
ID of payment object in Merchanter |
{ “_ID”: “”, “CustomerCode”: ””, “PaymentAmount”: 0.00, “PaymentDate”: ”1900-01-01T00:00:00.000Z”, “PaymentMethod”: ””, “PaymentReference”: “” } |
CustomerCode |
String |
50 |
Customer account code |
|
PaymentAmount |
Decimal |
|
Total amount paid |
|
PaymentDate |
Datetime |
|
Date of payment (UTC) |
|
PaymentMethod |
String |
20 |
Tender type code |
|
PaymentReference |
String |
20 |
|
Depots
· GEToperations
o /Depots – Retrieveinformation relating to depots under the current user account’s ledger
§ Parameters
· Querytype
o Where – a filterexpression string with ANDed filters. Available filters are
§ IsEcommerceDepot – is this anecommerce depot? true/false
E.g. Where=IsEcommerceDepot==true
§ Response schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
Name |
String |
100 |
Full name of the depot |
[ { "Name": "", "Code": "", "EmailAddress": "", "DefaultAddress": { "AddressLine1": "", "AddressLine2": "", "City": "", "PostalCode": "", "PhoneNumber": "", "Country": { "Country_ISO3166_1": { "CountryCode_2": "" } } }, "IsEcommerceDepot": false, "changedDate": "1900-01-01T00:00:00.000Z" } ] |
Code |
String |
2 |
Depot code |
|
EmailAddress |
String |
100 |
|
|
IsEcommerceDepot |
Boolean |
|
Ecommerce depot? |
|
changedDate |
Datetime |
|
Date & time of last update |
|
DefaultAddress |
|
|
|
|
- AddressLine1 |
String |
30 |
|
|
- AddressLine2 |
String |
30 |
|
|
- City |
String |
30 |
|
|
- PostalCode |
String |
10 |
|
|
- PhoneNumber |
String |
30 |
|
|
- Country |
|
|
|
|
- - Country_ISO3166_1 |
|
|
|
|
- - - CountryCode_2 |
String |
2 |
ISO 3166-1 country code |
Products
· GEToperations
o /Products – Retrieveinformation relating to products under the current user account’s ledger
· HTTPheader type
o If-Modified-Since – a UTCtimestamp (format ‘yyyy-MM-dd HH:mm:ss’). Only products that have been createdor modified since this timestamp will be returned
· Querytype
o Where – a filterexpression string with ANDed filters. Available filters are
§ IsSpecial – is the product a special(special products are usually non-stock items for one-off sales)? true/false
§ SellOnline – is this an ecommerceproduct? true/false
E.g.Where=IsSpecial==false&&SellOnline==true
o page – page number. Up to100 products will be returned per call when the page parameter is used e.g.page=1.
§ Response schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
Code |
String |
20 |
Product code |
[ { "Code": "", "StockUoM": "", "Description": "", "LiveStatus": "", "ProductType": "", "StockDecimalPrecision": "", "IsSpecial": false, "SellOnline": false, "BoxFactor": 0, "ProductSubGroup": { "ProductSubGroupName": "", "ProductSubGroupShortName": "" }, "ProductGroup": { "ProductGroupName": "", "ProductGroupShortName": "" }, "SupplierProductCodes": [ { "Code": "", "Supplier": { "Code": "" } } ], "PreferredSupplier": { "Code": "" } } ] |
StockUoM |
String |
|
Primary stock unit of measure – Unit_s_, Sheet_s_, Piece_s_, Metre_s_ |
|
Description |
String |
|
Full product description |
|
LiveStatus |
String |
|
Product live status – Live, Withdrawn, Archived, Catalogue |
|
ProductType |
String |
|
Product type – Goods, Service, Special |
|
StockDecimalPrecision |
String |
|
Decimal precision of stock – dp0, dp1, dp2, dp3 |
|
IsSpecial |
Boolean |
|
Is this a special product? |
|
SellOnline |
Boolean |
|
Is this an ecommerce product? |
|
BoxFactor |
Integer |
|
Number of units per box |
|
ProductGroup |
|
|
|
|
- ProductGroupName |
String |
40 |
Full name of product analysis group |
|
- ProductGroupShortName |
String |
20 |
Shorter name of product analysis group |
|
ProductSubGroup |
|
|
|
|
- ProductSubGroupName |
String |
40 |
Full name of product analysis subgroup |
|
- ProductSubGroupShortName |
String |
20 |
Shorter name of product analysis subgroup |
|
SupplierProductCodes (array) |
|
|
|
|
- Code |
String |
200 |
Supplier product code |
|
- Supplier |
|
|
|
|
- - Code |
String |
50 |
Supplier account code |
|
PreferredSupplier |
|
|
|
|
- Code |
String |
50 |
Supplier account code |
o /Products/Prices – Retrievepricing information for products under the current user account’s ledger
· HTTPheader type
o If-Modified-Since – a UTCtimestamp (format ‘yyyy-MM-dd HH:mm:ss’). Only products that have been createdor modified since this timestamp will be returned
· Querytype
o Where – a filterexpression string with ANDed filters. Available filters are
§ IsSpecial – is the product a special?true/false
§ SellOnline – is this an ecommerceproduct? true/false
E.g.Where=IsSpecial==false&&SellOnline==true
o page – page number. Up to100 products will be returned per call when the page parameter is used e.g.page=1.
§ Response schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
ProductCode |
String |
20 |
Product code |
[ { "ProductCode": "", "BasePrice": 0.00, "VATRate": 0.00, "ProductPrices": [ { "PriceBandCode": "", "Price": 0.00 } ] } ]
|
BasePrice |
Decimal |
|
Base selling price |
|
VATRate |
Decimal |
|
VAT rate percentage |
|
ProductPrices (array) |
|
|
|
|
- PriceBandCode |
String |
2 |
Price band code |
|
- Price |
Decimal |
|
Nett price (per stock unit of measure) for price band |
Sales
· POSToperation
o /Sales/Orders – Create anew sales order at draft status
§ Request schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Required |
Notes |
Request Body (JSON) |
WebOrderRef |
String |
12 |
Yes |
Order reference number as known to the ecommerce website |
{ “WebOrderRef”: “”, “ERPOrderRef”: “”, “OrderDate”: "1900-01-01T00:00:00.000Z", “DeliveryDate”: "1900-01-01T00:00:00.000Z", “CustomerCode”: “”, “CustomerName”: “”, “EmailAddress”: “”, “OrderStatus”: “”, “CollectOrDeliver”: “”, “BranchCode”: “”, “CollectionBranchCode”: “”, “CollectionDetails”: “”, “TotalExVAT”: 0.00, “TotalInclVAT”: 0.00, “DeliveryCost”: 0.00, “DiscountTotal”: 0.00, “PaymentTaken”: false, “PaymentAmount”: 0.00, “PaymentMethod”: “”, “PaymentReference”: “”, “ShippingAddress”: { “Street1”: “”, “Street2”: “”, “Town”: “”, “County”: “”, “Country”: “”, “Postcode”: “”, “PhoneNr”: “” }, “Items”: [ { “ProductCode”: “”, “ItemDescription”: “”, “Quantity”: 0.000, “UnitPriceExVAT”: 0.00, “TotalInclVAT”: 0.00, “Specification”: “” } ] } |
ERPOrderRef |
String |
10 |
|
Order reference number as known to Merchanter – not used at present |
|
OrderDate |
Datetime |
|
Yes |
Date of order placement (UTC time) |
|
DeliveryDate |
Datetime |
|
No |
Expected date of delivery (UTC time) |
|
CustomerCode |
String |
50 |
Yes |
Customer account code |
|
CustomerName |
String |
60 |
No |
Customer name (for guest customers – account code CASHWEB) |
|
EmailAddress |
String |
200 |
Yes |
Contact e-mail address |
|
OrderStatus |
String |
20 |
|
Order status - not used at present |
|
CollectOrDeliver |
String |
12 |
Yes |
‘Collection’ or ‘Delivery’ |
|
BranchCode |
String |
2 |
Yes |
Code of depot supplying the order (if delivery) |
|
CollectionBranchCode |
String |
2 |
Yes |
Code of depot supplying the order (if collection) |
|
CollectionDetails |
String |
200 |
No |
Supply instructions |
|
TotalExVAT |
Decimal |
|
Yes |
Total goods value of order excluding VAT |
|
TotalInclVAT |
Decimal |
|
Yes |
Order total value including VAT and delivery cost |
|
DeliveryCost |
Decimal |
|
Yes |
Total delivery cost including VAT |
|
DiscountTotal |
Decimal |
|
Yes |
Total discount value – discounts not currently supported so should always be zero |
|
PaymentTaken |
Boolean |
|
Yes |
Has a web payment been taken? |
|
PaymentAmount |
Decimal |
|
Yes |
Web payment amount – zero if no payment taken |
|
PaymentMethod |
String |
20 |
|
Tender type code for web payment – only required if payment taken |
|
PaymentReference |
String |
200 |
No |
Web payment reference number |
|
ShippingAddress |
|
|
|
|
|
- Street1 |
String |
30 |
No |
|
|
- Street2 |
String |
30 |
No |
|
|
- Town |
String |
30 |
No |
|
|
- County |
String |
40 |
No |
|
|
- Country |
String |
30 |
No |
|
|
- Postcode |
String |
10 |
No |
|
|
- PhoneNr |
String |
20 |
No |
|
|
Items (array) |
|
|
|
|
|
- ProductCode |
String |
20 |
Yes |
Product code |
|
- ItemDescription |
String |
200 |
Yes |
Item description |
|
- Quantity |
Decimal |
|
Yes |
Order quantity (per stock unit of measure) |
|
- UnitPriceExVAT |
Decimal |
|
Yes |
Unit price excluding VAT |
|
- TotalInclVAT |
Decimal |
|
Yes |
Total item value including VAT |
|
- Specification |
String |
|
No |
Timber specification (fixed cross-section) in the format Q1 x L1 | Q2 x L2 | Q3 x L3 | … | Qn x Ln where Q is the number of pieces, L is the spec length (to 1 decimal place) and n is the total number of lengths – only applies to timber products |
The successful response schema & body (JSON) is as follows: -
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
_ID |
String |
20 |
ID of sales order object in Merchanter |
{ “_ID”: “”, “InternalOrderNumber”: 0, “OrderDate”: "1900-01-01T00:00:00.000Z", “SupplyDate”: "1900-01-01T00:00:00.000Z", “CustomerCode”: “”, “CustomerReference”: “”, “SupplyInstructions”: “”, “DeliveryType”: “”, “DepotCode”: “”, “SalesValue”: 0.00, “TaxValue”: 0.00, “TotalPlusVAT”: 0.00, “TransportCost”: 0.00, “DeliveryAddress”: { “Address1”: “”, “Address2”: “”, “Address3”: “”, “City”: “”, “County”: “”, “Postcode”: “”, “Name”: “”, “PhoneNr”: “” }, “Payment”: { “PaymentAmount”: 0.00, “PaymentDate”: "1900-01-01T00:00:00.000Z", “PaymentMethod”: “”, “PaymentReference”: “” }, “Items”: [ { “ProductCode”: “”, “ItemDescription”: “”, “OrderQuantity”: 0.000, “NettPrice”: 0.00, “SalesValue”: 0.00, “VATPercentage”: 0.00, “VATCode”: “”, “SpecificationSummary”: “” } ] } |
InternalOrderNumber |
Integer |
|
Internal order number of sales order in Merchanter |
|
OrderDate |
Datetime |
|
Date of order placement (UTC time) |
|
SupplyDate |
Datetime |
|
Supply date (UTC time) |
|
CustomerCode |
String |
50 |
Customer account code |
|
CustomerReference |
String |
60 |
Customer reference |
|
SupplyInstructions |
String |
|
Supply instructions |
|
DeliveryType |
String |
|
Delivery type – Direct_to_site, Collected, Delivered, Cash, Credits, SuppliedNow |
|
DepotCode |
String |
2 |
Supplying branch code |
|
SalesValue |
Decimal |
|
Total sales value of order excluding VAT (in home currency) |
|
TaxValue |
Decimal |
|
Total VAT value (in home currency) |
|
TotalPlusVAT |
Decimal |
|
Total sales value of order including VAT (in home currency) |
|
TransportCost |
Decimal |
|
Transport cost excluding VAT (in home currency) |
|
DeliveryAddress |
|
|
|
|
- Address1 |
String |
30 |
|
|
- Address2 |
String |
30 |
|
|
- Address3 |
String |
30 |
|
|
- City |
String |
30 |
|
|
- County |
String |
40 |
|
|
- Postcode |
String |
10 |
|
|
- Name |
String |
30 |
|
|
- PhoneNr |
String |
30 |
|
|
Payment |
|
|
|
|
- PaymentAmount |
Decimal |
|
Payment amount |
|
- PaymentDate |
Datetime |
|
Date of payment (UTC) |
|
- PaymentMethod |
String |
20 |
Tender type code |
|
- PaymentReference |
String |
200 |
Payment reference number |
|
Items (array) |
|
|
|
|
- ProductCode |
String |
20 |
Product code |
|
- ItemDescription |
String |
200 |
Item description |
|
- OrderQuantity |
Decimal |
|
Order quantity (per order quantity unit of measure) |
|
- NettPrice |
Decimal |
|
Nett unit price excluding VAT (in order currency per price unit of measure) |
|
- SalesValue |
Decimal |
|
Nett sales value of the item (in order currency) |
|
- VATPercentage |
Decimal |
|
VAT rate percentage |
|
- VATCode |
String |
1 |
VAT rate code – C (EC Sales), E (Export), G (Group), L (Low), S (Standard), X (Exempt), Z (Zero) |
|
- SpecificationSummary |
String |
|
Timber specification summary |
Stock
· GEToperations
o /Stock/DepotStockOverviews– Retrieve stock information at a depot level for products under the currentuser account’s ledger
§ Parameters
· HTTPheader type
o If-Modified-Since – a UTCtimestamp (format ‘yyyy-MM-dd HH:mm:ss’). Only depot stock overviews and/orstock configurations (for minimum stock level) that have been created ormodified since this timestamp will be returned
· Querytype
o Where – a filterexpression string with ANDed filters. Available filters are
§ IsSpecial – is this stock overviewfor a special product? true/false
§ SellOnline – is this stock overviewfor an ecommerce product? true/false
§ IsEcommerceDepot – is this stockoverview for an ecommerce depot? true/false
E.g.Where=IsSpecial==false&&SellOnline==true&&IsEcommerceDepot==true
o page – page number. Up to100 depot stock overviews will be returned per call when the page parameter isused e.g. page=1.
§ Response schema & body (JSON)
Attribute Name |
Data Type |
Max Length |
Notes |
Response Body (JSON) |
Free |
Decimal |
|
Available stock quantity |
[ { "Free": 0.000, "IsStockControlled": false, "ProductStockLocation": { "StockConfiguration": { "MinimumStock": 0.000 } }, "Product": { "Code": "" }, "Depot": { "Code": "" } } ] |
IsStockControlled |
Boolean |
|
Stock controlled? |
|
ProductStockLocation |
|
|
|
|
- StockConfiguration |
|
|
Stock configuration info |
|
- - MinimumStock |
Decimal |
|
Minimum stock level |
|
Product |
|
|
Product info |
|
- Code |
String |
20 |
Product code |
|
Depot |
|
|
Depot info |
|
- Code |
String |
2 |
Depot code |