Radial Integration | 2016

Working with Radial APIs > API Requests and Responses

API Requests and Responses

URI Structure

Many of Radial's APIs follow this structure for URIs:

https://env-rr.gsipartners.com/vM.m/stores/STOREID/service/operation[/parameters].format

URI elements in bold font above are described in more detail below. Only representative parameters are shown. Any additional text is required “as is” within the URI structure. Square brackets ([ ]) in the URI above indicate optional elements. Refer to the individual service operation for details on usage.

Making Requests

You can manually create a request and send it to the web service layer using the Firefox REST client, Google Chrome REST client, or another REST client.

Example REST client request

Responses

After a request is sent to the web service layer, one of the following scenarios occurs:

A valid response from the web service layer can take any of the following forms:

Fault Responses

Radial APIs use a common fault response schema to provide consistency across the service calls. The Checkout-Service-Fault-1.0.xsd element documents the response that is returned for any call that cannot be serviced properly by the Radial platform. This is a top-level element.

A fault will be returned any time an exception occurs that prevents a transaction from being processed properly, including:

Response Header

During the use of Radial APIs, the consumer of the service sends a request to the service and receive a response from the service. The response contains a response header and a response body, in the same way that the request contained a request header and request body.

The response header contains the following data elements:

Header Element

Description

Status Code

This is a standard HTTP status code; a “200” status indicates the request was successfully processed. A “400” or “500” series status code indicates that an error occurred.

Content-Length

The number of total bytes in the response. Sometimes also called “Message Size”.

Content-Type

Should always be “application/xml; charset=UTF-8” when successful (though this may vary based on the service called).

Date

This is the Date/Time stamp at the time request was generated. Time zone is typically UTC and is always explicitly stated.

Expires

The cache expiry setting. If the cache is set to expire immediately, this will be set to the same value as the Date: field of the response header. Time zone is typically UTC and is always explicitly stated.

Other fields

These may contain session ID valuess and other data that are added to the response header as it is processed.

When an error occurs during the processing of a request, the response header will contain an error HTTP status code and the response body content will contain the details of the cause of the error.

Error Status Codes

400 Series Status Codes

400 series error status codes indicate a problem with the API request. These problems can include the following:

These requests must be corrected before attempting to resubmit them. Without first correcting the problem specified in the response, the request will never be successfully processed.

500 Series Status Codes

500 Series Errors indicate a problem with the systems processing the request. These problems can include the following:

These requests must be evaluated to determine if any changes are needed before they can be resubmitted.

Error Response Message Example

XML Response

<?xml version="1.0" encoding="UTF-8"?>
<Fault xmlns="http://api.gsicommerce.com/schema/checkout/1.0">
  <CreateTimestamp>##TIME_STAMP##</CreateTimestamp> 
  <Code>##CODE##</Code>
  <Description>##DESCRIPTION##</Description>
</Fault>

 

Copyright © 2017 Radial. All rights reserved.