SQUIZZ.com
Loading interface, please wait...
Interface taking a long time to load?
Check your internet connection is up, and you're using the latest app/browser version.

Platform API Endpoint: Retrieve Organisation Customer Account Record

This API endpoint allows systems of one organisation to obtain the full details of a single transactional customer accounting record in real time, from another connected organisation's business system, who has connected their business system to the SQUIZZ.com platform. This transaction record can be an invoice, sales order, back order, payment or credit record type.

Within the SQUIZZ.com Application Programming Interface (API) it contains an endpoint that allows one organisation using 3rd party software to obtain full details of a single transactional customer account record from another connected organisation's business system in real time. This is typically used by customer/purchasing organisations to obtain the details of an invoice, sales order, transaction, payment or credit record, directly linked to a customer account of a supplying organisation. The record obtained is based on trading activity that has occurred against a customer account. This endpoint may be used to lookup or import a trading record, such as importing a supplier's invoice into a customer's own business system for accounting purposes. Or check the state of a record, such as a past payment made, a credit applied against the account, a sales order raised but not yet converted into an invoice, or back order awaiting goods to be recieved by a supplier further up their supply chain.

To use the API endpoint you will need to have knowledge in building software applications, and how to make requests over the internet to call RESTful web services, that the platform's API endpoint is based on. It also helps having basic business knowledge in commerce and trading.

Topics

  1. Prerequisites
  2. Overview
  3. Retrieve Invoice Customer Account Record
  4. Retrieve Sales Order Customer Account Record
  5. Retrieve Back Order Customer Account Record
  6. Retrieve Credit Customer Account Record
  7. Retrieve Payment Customer Account Record

Overview

The SQUIZZ.com platform's API's "Retrieve Organisation Customer Account Record" endpoint allows an organisation to retrieve the details and lines for a record from another connected organisation's business sytem, based on a record associated to an assigned customer account. This endpoint allows an organisation to securely get the details for a invoice, sales order, back order, transactions. credit or payment record, retrieved in realtime from a supplier organisation's connected business system. The record returned from endpoint is formatted as JSON data conforming to the "Ecommerce Standards Document" standards, with the document containing an array of zero or one record. The record found and returned is controlled by the supplying organisation's business system performing the search. This endpoint may be called after a specific record has been found previously using the Search Organisation Customer Account Records API endpoint.

Notes

  • A session must first be created in the API before calling the endpoint.
  • The organisation calling the endpoint must be connected to the "supplying" organisation that is facilitating the record searching.
  • The organisation calling the endpoint must be assigned to a customer account by the supplying organisation.
  • A maximum of 100 search requests can be made against a supplying organisation within the last 15 minutes. This ensures the supplying organisation is not flooded with too many requests.
  • The supplying organisation being called to perform the record search must have enough trading tokens to allow the searches to occur, as outlined in the Trading Tokens and Pricing document.
  • The supplying organisation being called to the perform the record search must have set up an integration with their own business system(s) to SQUIZZ.com, containing the customer account record data. This system must support receiving requests made by the SQUIZZ.com platform, as outlined in the Outgoing Request: Get Customer Account Enquiry Record endpoint. The SQUIZZ.com Connector software can be used by the supplying organisation to facilitate searching in their own business system. if the system does not provide its own web service or support the Ecommece Standards Documents standards.

 

HTTP Method GET
HTTP URL https://api.squizz.com/rest/1/org/retrieve_customer_account_record_esd/session_id  
Headers Data Type Mandatory
Content-Type STRING Yes
  application/json
Parameters Data Type Mandatory
session_id STRING Yes
  ID of the API session. Place the session ID within the URL
supplier_org_id STRING Yes
  ID of the organisation on the SQUIZZ.com platform to obtain records from.
customer_account_code STRING Yes
  Code of the supplying organisation's customer account that records are associated to. The organisation calling this API endpoint must be assigned to this customer account by the supplying organisation.
record_type STRING Yes
  ID of type of record to obtain. Set to one of the following:
  • INVOICE
    Invoice record that contains the amounts and all detail of a confirmed purchase made by a customer. This includes lines in the invoice record.
     
  • ORDER_SALE
    Sales order record that contains the amounts and all detail of a purchase being made by a customer. This includes all lines in the sales order record.
     
  • BACKORDER
    Back order record that indicate orders that has been made to supplying organisations further up the supply chain to obtain  goods or services that were not immiately available when an associated sales order was raised against a customer.
     
  • CREDIT
    Credit record that contains the full detail of a credit that has been applied against a customer account. Each credit may reduce the balance of the customer account, such for returned goods, refunds, or credit adjustments. The credit record may contain lines of the items that the credit has been applied against.
     
  • PAYMENT
    Payment record that contain the full detail of a payment that has been applied against a customer account. The payment record may reduce the balance of the customer account when money has been paid back to the supplying organisation to cover one or more invoices or sales orders.
key_record_id STRING Yes
 

The unique key identifier of the record to retrieve. This identifier can be found by calling the Search Organisation Customer Account Records API endpoint.
 

For the different record type being retrieved set this value, based on the value set in one if the record's fields found from the Search Organisation Customer Account Records API endpoint:

  • keyInvoiceID
    The unique identifier of the invoice record.
     
  • keyOrderSaleID.
    The unique identifier of the sales order record.
     
  • keyBackOrderID
    The unique identifier of the back order record.
     
  • keyCreditID
    The unique identifier of the credit record.
     
  • keyPaymentID
    The unique identifier of the payment record.

HTTP Response

Response Data Type JSON
Response Body ESDocumentCustomerAccountEnquiry

Returns serialized JSON of a ESDocumentCustomerAccountEnquiry document containing 0 or 1 records within the list of customer account records for the given record type.
   
Parameters Data Type
resultStatus INTEGER
  If 1 then denotes a successful response has been returned. 0 or 1 record may have been found. If not 1 then indicates an error has occurred when trying to retrieve the record.
configs.result_status ENUM (SUCCESS or FAILURE)
  Either "SUCCESS" or "FAILURE". If successful then the data was retrieved from the supplying organsiation's business system.
configs.api_version DECIMAL
  Version of the SQUIZZ.com platform's API used to handle the request
configs.result_code STRING
 

Status code of trying to search for the customer account record data. The following codes could be returned:

  • SERVER_SUCCESS
    The record search successfully occurred, with 0 or 1 records being returned in the response.
     
  • SERVER_ERROR_ORG_DOES_NOT_EXIST
    The supplier organisation with the given organisation ID could not be found or is not active within the platform. Check with the supplier organisation that their organisation ID issued by the platform is correct. 
     
  • SERVER_ERROR_ORG_CANNOT_BE_FOUND
    The organisation calling this endpoint is not connected to the supplying organisation, or the supplying organisation is not active.
     
  • SERVER_ERROR_SESSION_INVALID
    The session used to call the endpoint has expired, or never existed. Look at calling the Create Session endpoint to get another session ID.
     
  • SERVER_ERROR_INCORRECT_RECORD_TYPE
    The record type specified in the record_type URL parameter is not valid or not given. Ensure the parameter contains one of the values, INVOICE, TRANSACTION, ORDER_SALE, CREDIT, PAYMENT or BACKORDER
     
  • SERVER_ERROR_NO_ORG_CUSTOMER_ACCOUNT_SET
    The supplier organisation has not assigned any customer account to the customer organisation. The supplier organiation needs to import and assign the customer organisation to a customer account to allow this endpoint to perform record searches.
     
  • SERVER_ERROR_NO_ORG_CUSTOMER_ACCOUNT_ASSIGNED
    The supplier organisation has not assigned any customer account to the customer organisation. The supplier organiation needs to import and assign the customer organisation to a customer account.
     
  • SERVER_ERROR_MAX_SEARCHES_REACHED
    The amount of times that a request has been made to search for records against the supplying organisation has been reached, In the response's config object look at the search_wait_period to see how many minutes you need to wait before being able to make another search request again. This search limit exists to ensure that the supplying organisation's systems are not flooded with record search requests.
     
  • SERVER_ERROR_ORG_NOT_ENOUGH_CREDITS
    The supplier organisation does not have enough trading tokens within the platform to allow the record retrieval to occur. The supplier organisation needs to purchase more trading tokens to allow further record retrievals to take place. You may want to get in touch with the supplying organisation to advise them to top up their trading tokens balance.
     
  • SERVER_ERROR_DATA_JSON_WRONG_CONTENT_TYPE
    The content type set in the HTTP Request Header is missing or not correctly set to "application/json". Ensure that the body of the HTTP request also has the purchase order data set in the JSON data format.
configs.search_wait_period STRING
  Amount of minutes that the organisation calling this endpoint needs to wait before being able to perform a retrieval again. This is only relevant if the result is a failure.
invoiceRecords JSON ARRAY
  List of Customer Account Enquiry Invoice Records containing 0 or 1 records with the found invoice record. This array will only be not null if the record_type is set to INVOICE,
orderSaleRecords JSON ARRAY
  List of Customer Account Enquiry Sales Order Records containing 0 or 1 records with the found sales order record. This array will only be not null if the record_type is set to ORDER_SALE
backOrderRecords JSON ARRAY
  List of Customer Account Enquiry Back Order Records containing 0 or 1 records with the found back order record. This array will only be not null if the record_type is set to BACKORDER
creditRecords JSON ARRAY
  List of Customer Account Enquiry Credit Records containing 0 or 1 records with the found credit record. This array will only be not null if the record_type is set to CREDIT
paymentRecords JSON ARRAY
  List of Customer Account Enquiry Payment Records containing 0 or 1 records with the found payment record. This array will only be not null if the record_type is set to PAYMENT

Native Coding Library Examples:

PHP | .NET | Java

HTTP Response Example:

{   
    "resultStatus": 1,
    "version":1.3,
    "message": "",
    "configs":{
        "api_version":"1.0.0.0",
        "result_status": "SUCCESS",
        "result_code":"SERVER_SUCCESS",
        "dataFields":"[csv_list_of_data_fields]"
    },
    "invoiceRecords":[list_containing_found_invoice_record],
    "orderSaleRecords":[list_containing_found_sales_order_record],
    "backOrderRecords":[list_containing_found_back_order_record],
    "creditRecords":[list_containing_found_credit_record],
    "paymentRecords":[list_containing_found_payment_record],
}

Retrieve Invoice Customer Account Record

The Search Organisation Customer Account Records API endpoint can be called by one organisation to obtain a single invoice record from within another connected organisation's business system, where the invoice record is associated with a specified customer account of the supplying organisation.

The endpoint will return a list of Customer Account Enquiry Invoice records in the Customer Account Enquiry Ecommerce Standards Document (ESD) JSON data format that the retrieving organisation has been given access to, based on the customer account that the supplying organisation has assigned to the retreiving organisation. The list of invoice records will only contain at most a single record.

Within the retrieved Customer Account Enquiry JSON document, the invoice record is conforms to the Customer Account Enquiry Invoice ESD Record format.

Native Coding Library Examples:

PHP | .NET | Java

HTTP Request Raw Example:

GET https://api.squizz.com/rest/1/org/retrieve_customer_account_record_esd/3042EXAMPLEGSESSIONID342?supplier_org_id=1302EXAMPLEORGID&customer_account_code=ACCEG002&record_type=INVOICE&key_record_id=112 HTTP/1.1
Host: api.squizz.com
Content-Type: application/json

HTTP Response Example:

Below is an example Customer Account Enquiry Invoice Document returned by the API endpoint.

{
 "version": 1.4,
 "resultStatus": 1,
 "message":"The customer account enquiry invoice detail data has been successfully obtained.",
 "dataTransferMode": "COMPLETE",
 "totalDataRecords": 1,
 "configs":{
  "api_version": "1.0.0.0",
  "result_code": "SERVER_SUCCESS",
  "search_wait_period": 15
 },
 "invoiceRecords":
  [
  {
   "keyInvoiceID":"112",
   "invoiceID":"INVOICE-112",
   "keyCustomerAccountID":"222",
   "customerAccountCode":"CUST004",
   "invoiceNumber": "1234123",
   "creationDate": 1449132083084,
   "invoiceDate": 1449932083084,
   "dueDate": 1449932083084,
   "expectedDeliveryDate": 1449982083084,
   "deliveredDate": 1449982083084,
   "keyLocationID": "456",
   "locationCode": "LCT-456",
   "locationLabel": "Warehouse",
   "locationType": "WAREHOUSE",
   "referenceKeyID": "ORDER-123",
   "referenceType": "ORDER",
   "referenceNumber": "123-1234123",
   "customerReference": "PO-12345",
   "salesRepCode": "JD",
   "salesRepName": "John Doe",
   "deliveryContact": "Lee",
   "deliveryOrgName": "Lee's Business Pty Ltd",
   "deliveryAddress1": "22",
   "deliveryAddress2": "Bourkie Street",
   "deliveryAddress3": "Melbourne",
   "deliveryStateProvince": "Victoria",
   "deliveryCountry": "Australia",
   "deliveryCountryCodeISO2": "AU",
   "deliveryCountryCodeISO3": "AUS",
   "deliveryPostcode": "3000",
   "billingContact": "Tom",
   "billingOrgName": "Lee's Business Pty Ltd",
   "billingAddress1": "15",
   "billingAddress2": "Bourkie Street",
   "billingAddress3": "Melbourne",
   "billingStateProvince": "Victoria",
   "billingCountry": "Australia",
   "billingCountryCodeISO2": "AU",
   "billingCountryCodeISO3": "AUS",
   "billingPostcode": "3000",
   "taxNumber": "123 12332 123",
   "taxLabel": "GST",
   "taxRate": 10,
   "totalExTax": 100.00,
   "totalIncTax": 110.00,
   "totalTax": 10.00,
   "totalFreightIncTax": 11.00,
   "totalFreightExTax": 10.00,
   "totalExtraChargesIncTax": 1.10,
   "totalExtraChargesExTax": 1.00,
   "totalDiscountsIncTax": 220.00,
   "totalDiscountsExTax": 22.00,
   "totalLeviesIncTax": 22.00,
   "totalLeviesExTax": 20.00,
   "totalPaid": 50.00,
   "balance": 60.00,
   "currencyCode": "AUD",
   "totalQuantity": 3,
   "description": "",
   "freightCarrierCode": "ACME-FREIGHT-001",
   "freightCarrierName": "ACME Freight Shippers",
   "freightSystemRefCode": "SHIP-SYS",
   "freightCarrierConsignCode": "CON-23124123",
   "freightCarrierTrackingCode": "34325-25243-24343",
   "freightCarrierServiceCode": "EXPRESS-24",
   "freightCarrierAccountCode": "ACME-001",
   "language": "EN_AU",
   "comment": "Please leave goods by the back entrance",
   "lines":
   [
    {
     "keyInvoiceLineID":"11234122"
    },
    {
     "keyInvoiceLineID":"11234123",
     "lineItemID":"PROD1234453",
     "lineItemCode":"PROD-123",
     "lineType":"ITEM",
     "description":"Tea Towels",
     "language":"EN_AU",
     "unit":"EACH",
     "quantityOrdered": 22,
     "quantityDelivered": 22,
     "quantityBackordered": 0,
     "priceExTax": 300.00,
     "priceIncTax": 330.00,
     "priceTax": 30.00,
     "totalPriceExTax":6600.00,
     "totalPriceIncTax": 7260.00,
     "totalPriceTax": 660,
     "taxCode":"GST",
     "keyLocationID":"456",
     "locationCode":"LCT-456",
     "currencyCode":"AUD",
     "referenceLineItemCode":"",
     "referenceLineCode":""
    },
    {
     "keyInvoiceLineID":"11234124",
     "lineType":"TEXT",
     "description":"Tea towels are packed into cardboard boxes"
    }
   ]
  }
 ]
}

Retrieve Sales Order Customer Account Record

The Search Organisation Customer Account Records API endpoint can be called by one organisation to get the fulll details of a single sales order record from within another connected organisation's business system, where the sales order record is associated with a specified customer account of the supplying organisation. The sales order record defines a sale made against the customer account, for one or more quantities of goods and services. The sale may, or may not have yet be converted into an invoice, with the sales order representing an intention by a customer to make a transaction. A sales order may have 0 to many lines, with each line representing either a quantity of an item (product/service/goods) being purchased or a text line.

The endpoint will return a list of Customer Account Enquiry Sales Order records in the Customer Account Enquiry Ecommerce Standards Document (ESD) JSON data format that the retrieving organisation has been given access to, based on the customer account that the supplying organisation has assigned to the retreiving organisation. The list will contain at most a single sales order record.

Within the retrieved Customer Account Enquiry JSON document, the sales order record conforms to the Customer Account Enquiry Order Sale ESD Record format.

Native Coding Library Examples:

PHP | .NET | Java

Retrieve Back Order Customer Account Record

The Search Organisation Customer Account Records API endpoint can be called by one organisation to retrieve the full details of a single back order record from within another connected organisation's business system, where the back order record is associated with a specified customer account of the supplying organisation. The back order record outlines where the supplying organisation has not had the goods or services available that a customer had purchased, and the supplier has had to order the goods or services from their own supplier. Typically a back order is associated to a sales order or invoice record. Once a supplying organisation has received the goods and services it typically allows the back order to be closed, allowing corresponding sales orders or invoices to be completed. A back order may have 0 to many lines, with each line representing either a quantity of an item (product/service/goods) being back ordered, or a text line.

The endpoint will return a list of Customer Account Enquiry Back Order records in the Customer Account Enquiry Ecommerce Standards Document (ESD) JSON data format that the retrieving organisation has been given access to, based on the customer account that the supplying organisation has assigned to the retreiving organisation. The list will contain at most a single back order record.

Within the retrieved Customer Account Enquiry JSON document, the back order record conforms to the Customer Account Enquiry Back Order ESD Record format

Native Coding Library Examples:

PHP | .NET | Java

Retrieve Credit Customer Account Record

The Search Organisation Customer Account Records API endpoint can be called by one organisation to retrieve the full details of a single credit record from within another connected organisation's business system, where the credit record is associated with a specified customer account of the supplying organisation. The credit record defines a monetary amount that has been credited back to a customer, that may occur if a customer has been over charged, returned goods or services, or cancelled a sales order or invoice that wsa previously paid for. A credit may have 0 to many lines, with each line representing either a quantity of an item (product/service/goods) being credited back, or a text line.

The endpoint will return a list of Customer Account Enquiry Credit records in the Customer Account Enquiry Ecommerce Standards Document (ESD) JSON data format that the retrieving organisation has been given access to, based on the customer account that the supplying organisation has assigned to the retreiving organisation. The list will contain at most a single credit record.

Within the retrieved Customer Account Enquiry JSON document, the credit record conforms to the Customer Account Enquiry Credit ESD Record format.

Native Coding Library Examples:

PHP | .NET | Java

Retrieve Payment Customer Account Record

The Search Organisation Customer Account Records API endpoint can be called by one organisation to retrieve the full details of a single payment record from within another connected organisation's business system, where the payment record is associated with a specified customer account of the supplying organisation. The payment record defines a monetary amount that has been paid by a customer against the customer account. A payment record may have been applied against one or more invoices, or sales orders, and provides a credit against the customer account balance.

The endpoint will return a list of Customer Account Enquiry Payment records in the Customer Account Enquiry Ecommerce Standards Document (ESD) JSON data format that the retrieving organisation has been given access to, based on the customer account that the supplying organisation has assigned to the retreiving organisation. The list will contain at most a single payment record.

Within the retrieved Customer Account Enquiry JSON document, each payment record conforms to the Customer Account Enquiry Payment ESD Record format.

Native Coding Library Examples:

PHP | .NET | Java