Advance Positioning APIs
User Guide
Introduction and Background
Introduction
Today, the usage of REST APIs provides a modern communication standard between IT systems. In order to improve customer experience and respond to increased customer demands, Trimble’s - “TAP Business Systems Technology and Strategy” team is introducing a new REST API service that will process and manage Orders.
For customers who want to integrate Process/manage Order from their own custom application, REST API is an alternative communication interface that enables a partner to integrate create order/activation functionalities into their application easily and quickly.
This document provides you an overview of the new REST API, the methods supported during the initial Pilot Phase, the On Boarding and initial test procedures as well as the contact details of the TAPStore API v1.0 Support Team.
Business Need
Large resellers are looking for an easy, fast and affordable way to process the order and manage renewals, in a way that the cost wont exceed the margin for the subscriptions. The approach is to offer an API to the resellers/OEM’s to simplify the ordering process, provide device/activation and sales order related information on demand. Resellers will be able to use their existing applications for trimble products that makes doing business easier with Trimble. The API should also reduce the requests for order placing and trouble shooting to large sellers, their retail outlet and TAP customer care.
Technical Overview
API v1.0 Technical Spec
The REST API is secured using Oauth2 and ‘OpenID Connect’. When the customer is on-boarded they will be provided with the client_id and client_secret for authenticating and accessing the API services. This API is complementary in usage to the existing TAP store functionalities.
Authentication Mechanism
Please refer to the URL https://developer.trimble.com/docs/authentication for more information on how to generate access_token. We are using grant type as Client Credentials.
API Limits
Connection Timeout: Within how much time API should respond to get success/failure response from the backend system. If the limit is crossed then a Timeout error will occur. Value for this parameter is set to 55 (fifty five) seconds. If there is no response from API within this time, connection will timeout.
Spike Arrest: Spike Arrest is the number of concurrent requests that can be sent per second. After this limit is reached the Trimble cloud server will reject the request. The value for this parameter is set to - 1,500 (fifteen hundred) requests per second.
Supported Methods
This section defines the basic requirements, inputs and outputs payload for the below mentioned API’s:
- TAP_GET_CUSTOMERS_API
- TAP_GET_MFG_MODELS_API
- TAP_GET_PRODUCTS_API
- TAP_GET_ORDER_API
- TAP_GET_ACTIVATION_STATUS_API
- TAP_CREATE_ORDER_API
- TAP_RESEND_ACTIVATION_API
There are five GET APIs and two POST APIs
API flow diagram
API Usage notes applicable to API’s
- All request parameters will be validated. If a different field is passed in the payload other than the expected, API will respond with error for that field.
- Every API will have a uniqueId in the response payload. This can be helpful in tracking/debugging that specific request.
- Date/time format will be in UTC format. “YYYY-MM-DD hh:mm:ssZ” where Z is UTC
APIs in detail
TAP_GET_CUSTOMERS_API
Returns a list of reseller and end customer associated to Consumer’s identifier(clientId)
Base URI
URI with search parameters
Search Parameters details:
Parameter Name | Data Type | Description | Sample Values | Required |
---|---|---|---|---|
region | String | Customers can give the Region code to get the list of resellers/end customers belonging to the respective region. | APAC,AMERICA,EUROPE | Optional |
resellerName | String | To perform a search using the reseller’s name. Min length is 5 chars. | TRIMB | Optional |
endCustomerName | String | To perform a search using the end Customers name. Min length is 5 chars. | TRIMB | Optional |
customerCreationDate | Date | To get the list of end customers created after this date. | 2023-04-12T10:15:32Z | Optional |
Success Response Payload:
Error Response Payload:
Responses:
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Access Token Invalid |
Usage Notes:
- The API will validate the ‘ClientId’ (provided to the consumer during onboarding) against the Reseller account to get the information of the Reseller and associated End-Customers, which will be required for creating the order via API.
- End-customer information will be obtained based on their association with the reseller.
- In cases where no records are found for the parameters in the request, the API will respond with an error message ‘No data found’ accompanied by a status code of 400.
- Only Active Reseller/End-Customer information will be retrieved by the API.
- Valid values for region parameters are AMERICA, EUROPE, APAC , EMEA and SOUTH AFRICA
TAP_GET_MFG_MODELS_API
This API will be designed to handle requests for retrieving information about the Manufacturer and Models supported by Trimble. Upon request, users will be given a list of concatenated manufacturers and models, they will be separated by a double pipe (||) symbol (example Trimble||R12 Trimble is the Manufacture and R12 is the Model). Consumers of the API will have to separate the Manufacturer and Models before sending to “TAP_GET_ORDER_API” API.
Base URI
URI with search parameters
Search Parameters details:
Parameter Name | Data Type | Description | Sample Values | Required |
---|---|---|---|---|
manufacturer | String | Consumer can give the partial name of the Manufacturer to get only those Manufacture- models combinations | Trimble, Spectra | Optional |
Success Response Payload:
Error Response Payload:
Responses:
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Access Token Invalid |
Usage Notes:
- If the consumer of the API supplies a manufacturer value as an input parameter, the system will validate it against the Brand to Model mapping. Subsequently, the corresponding Manufacture||Models will be provided to the user.
- In the absence of any input, the system will retrieve all eligible manufacturer models and send them as part of the response payload.
- Should the request parameters yield no results, the API will respond with an error message “No data found” along with a status code of 400.
TAP_GET_PRODUCTS_API
This API has been developed to manage requests aimed at retrieving details concerning eligible part numbers for a specified customer and device model. Depending on the input provided by the consumer of the API, relevant services along with their details will be returned.
Base URI
URI with search parameters
Search Parameters details:
Parameter Name | Data Type | Description | Sample Values | Required |
---|---|---|---|---|
resellerbillToSiteUseId | Number | Users will get this id from TAP_GET_CUSTOMERS_API API | 121212 | Mandatory |
serviceType | String | Users have to pass which Service Type they want.(RTX / VRS) | RTX, VRS | Mandatory |
model | String | Manufacturer model is mandatory for the RTX Service Type. For VRS it is an optional field.Can be obtained by TAP_GET_MFG_MODELS_API api | Trimble R2, NAV900 | Mandatory Only for serviceType=’RTX’ |
partDescription | String | Users can pass partial search value for a Part description to get the list of eligible part numbers. | Ag Regional | Optional |
Success Response Payload:
Error Response Payload:
Responses:
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Access Token Invalid |
Usage Notes:
- The ‘Get Part Number’ functionality requires the resellerbillToSiteUseId, serviceType, and model as mandatory parameters for retrieving RTX Part Numbers. For the VRS Model, the Service Type is optional.
- Upon receiving the resellerBillToSiteUseId, the system verifies the associated price list at the customer level. If a price list is assigned, the system proceeds to obtain the part numbers, conducting additional validation based on Model and Service Type. Subsequently, eligible parts are returned to the user.
- Based on the resellerbillToSiteUseId API will share the geofence details for each item if it is eligible.
- In case no results are found with the request parameters, the API returns an error message “No data found” along with the status code 400
TAP_GET_ORDER_API
This API fetches details about orders created by either TAP_CREATE_ORDER_API (using the uniqueId that was in response to the createOrder API) or TAP Store.
Base URI
URI with search parameters
Request Payload Field details:
Parameter Name | Data Type | Description | Sample Values | Required |
---|---|---|---|---|
uniqueID | Number | unique ID which is returned by API - TAP_CREATE_ORDER_API | 13331 | ***Any one field is Mandatory |
serialNumber | String | If the consumer wants the information specific to the serial number, then they can provide this information as an input parameter | 1234567890 | ***Any one field is Mandatory |
poNumber | String | PO Number which is used in the createOrder API | HelloWorld | ***Any one field is Mandatory |
Success Response Payload:
Error Response Payload:
Responses:
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Access Token Invalid |
Usage Notes:
- To retrieve the status and order information of orders created by the TAP_CREATE_ORDER_API API, the uniqueId produced by the TAP_CREATE_ORDER_API API should be included in the subsequent request payload.
- Consumers can also obtain order information for orders not created via the API and existing in the TAP Store by providing the serialNumber or poNumber parameters.
- If the clientId of the customer for which order is placed and the clientId in the request doesn’t match, order info will not be retrieved. There will be an error as “No records found for requested parameters”.
- If the order is being processed or is on hold, appropriate status will be populated in the orderStatus field that has status as ORDER_CREATION_INPROGRESS, ORDER_ON_HOLD, SUCCESS and ERROR.
- If no results are found with the provided request parameters, the API will return an error message “No records found for requested parameters” with the status code 400.
TAP_GET_ACTIVATION_STATUS_API
This request will retrieve the activation status according to the customer’s input, and it will also provide the user with the passcodes associated with the provided serial number or order.
Base URI
URI with search parameters
Search Parameters Details:
Parameter Name | Data Type | Description | Sample Values | Required |
---|---|---|---|---|
orderNumber | Number | To retrieve the activation status of the order | 121 | ***Any one field is Mandatory |
serialNumber | String | To retrieve the activation status of the serial number | 1234567890 | ***Any one field is Mandatory |
Success Response Payload:
Error Response Payload:
Responses:
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Access Token Invalid |
Usage Notes:
- The system will validate whether there is an active or future subscription for the given serial number. If such subscriptions are available, the system will provide details for both the active and future subscriptions.
- Similarly, the system will validate the other input parameters and return the response with the respective information to the customers.
- If customers are sending only order number parameters in the request payload and if some of the lines within the order are canceled, then only active subscriptions details will be retrieved and sent in the response.
- If customers are sending only order number parameters in the request payload and all subscriptions within the order are expired then the API will send an error “No active subscriptions found for the order” response in the payload.
- If a customer is sending only serial number parameters in the request payload and it has active subscriptions, the API will return the corresponding data. However, if there are no active subscriptions (terminated, canceled, or expired) associated with the serial number then the API will send an error “No active subscriptions found for the serial number.”
- If no results are found with the provided request parameters, the API will return an error message “No data found” with the status code 400.
- Manual resend via BcApp will not be retrieved in this API.
TAP_CREATE_ORDER_API
Create New Order: Consumers can submit relevant information to commence the creation of an order for a specified customer and product.
Base URI
URI with search parameters
NA
Request payload Parameters details:
Parameter Name | Data Type | Description | Sample Values | Required |
---|---|---|---|---|
customerPONumber | String | PO Number field is the reference field of the reseller request | PO300424 | Mandatory |
customerOrderRef | String | Consumers application order reference or any other reference which Consumers need to save in Order. | Order30042024 | Optional |
currencyCode | String | In which currency the order should be created | USD | Mandatory |
activationCountry | String | If the customer wants to activate a country other than the ship-to-activation country this parameter should be passed as an input parameter | US | Optional |
promoCode | String | If the customer wants to apply a Promo code for the order then they can pass this field | RTX50 | Optional |
billToSiteUseId | Number | Which bill to customer details should be used for order creation. Can be retrieved from TAP_GET_CUSTOMERS_API api. | 531807 | Mandatory |
shipToSiteUseId | Number | Which Ship to customer details should be used for order creation. Can be retrieved from TAP_GET_CUSTOMERS_API api. | 1912956 | Mandatory |
billToContactEmail | String | If the provided email is already linked to a customer’s, the contact associated with this email will be utilized as InvoiceToContact in Order creation. (if there are multiple contacts then the latest created active contact will be utilized). However, if the email is not registered in the system, a new contact will be generated using the provided email. | test123@gmail.com | Mandatory |
billToContactPhone | String | To use the Phone number for the bill to contact. By default, it will be DECLINE. | 1234567890 | Optional |
shipToContactEmail | String | If the provided email is already linked to a customer’s, the contact associated with this email will be utilized as ShiptoContact in Order creation. (if there are multiple contacts then the latest created active contact will be utilized). However, if the email is not registered in the system, a new contact will be generated using the provided email. | test456@gmail.com | Mandatory |
shipToContactPhone | String | To use the Phone number for the bill to contact. By default, it will be DECLINE. | 1234567890 | Optional |
lineNumber | Number | Line Number for order lines. | 1 | Mandatory |
geoFenceRegion | String | The order should be created for the specified region. Can be retrieved from TAP_GET_PRODUCTS_API api. | R.GB.SBB(United Kingdom SBB) | Mandatory if ServiceType is VRS |
serviceType | String | This field represents which Service Type the order should be created. RTX or VRS | RTX | Mandatory |
manufacturerModel | String | This field represents for which Manufacturer and Model the order is getting created. Can be retrieved from TAP_GET_MFG_MODELS_API api | Ag482 | Mandatory |
partNumber | String | Which service customer wants to purchase. Can be retrieved from TAP_GET_PRODUCTS_API api. | 132001-10 | Mandatory |
serialNumber | String | Device Serial number | 1234567890 | Mandatory |
serviceStartDate | Date | Please refer to “Usage Notes” section for more info. | 2024-05-26 | Mandatory |
activationType | String | To identify the Activation type of the subscription. Immediate or Scheduled. | IMMEDIATE | Mandatory |
activationDate | Date | On which date should the activation be sent to the customer | 2024-05-26 | Mandatory for activationType as - Scheduled |
activationTime | String | At which time should the activation be sent to the customer? | 11.00.00 | Mandatory for activationType as - Scheduled |
autoRenewal | String | The customer would like to go with an auto-renewal. There are other validations in the order creation which will determine if the order is created with AutoRenewal as Yes. TAP_GET_ORDER_API api can be used to retrieve the AutoRenewal status after the order is created. | Y/N | Mandatory |
couponNumber | String | If the Coupon is to be applied against the particular line | 61236403205760 | Optional (Mandatory if it is a redemption order) |
ssoUserEmailAddress | String | SSO Email to link the VRS activation to the respective user. | test123@gmail.com | Mandatory - For all the VRS Serial Number |
simIncludedFlag | String | To Identify if simNumber and carrierName have values. | Y or N | Optional |
deviceKey | String | To unlock the device. | VRS4567 | Mandatory - For all the VRS Serial Number |
simNumber | Number | SIM number, if the VRS service comes with SIM subscriptions. | 8001002000145236 | Mandatory - For all the VRS Serial Number |
carrierName | String | Which carrier the SIM card is associated with. Please see UsageNotes for the list of valid carriers. | Telekom M2M | Mandatory - For all the VRS Serial Number |
Request Payload:
Success Response Payload:
Error Response Payload:
Responses:
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Access Token Invalid |
Usage Notes:
-
“Payment Term” and “Payment Method” which is available at Customer level in the TAP store will be used for order creation.
-
“Industry” which is available at Customer level in the TAP store will be used for order creation.
-
“Salesperson” which is available at Customer level in the TAP store will be used for order creation, if customer level is null then salesperson on the orders created will also be null.
-
“Price list” which is available at Customer level in the TAP store will be used for order creation. If there is no price list associated at customer level then the price list will be fetched based on the country to pricelist external mapping.
-
The system will validate the serial number for the RTX SerialNumbers based on the model. If a validation error occurs, the system will generate an error message.
-
If a timeout error is received from the createOrder API, the validation on the payload or the Order creation request is already started in the backend in the TAP Store. If a consumer tries to retry createOrder with the same serialNumber’s, API will throw an error stating that Order creation is in progress for the serialNumber please try after some some. Consumers can use getOrder API with serialNumber parameter to get the status of the order processing.
-
VRS serialNumber are case sensitive, if the serialNumber in the createOrder request payload already exists in TAP Store with a different case (Upper/Lower) we will convert the serialNumber received from the API createOrder request to match the case of the serialNumber in the TAP Store and trigger the order creation process. (Example: If in the TAP Store we have a serialNumber as “TESTApi01” and in the API request we are receiving serialNumber as “TestAPI01”. We will convert “TestAPI01” received from request payload to upper case and compare it with serialNumber in the store - “TESTApi01” (which will also be converted to upper case). If serialNumber matches we will create a Renewal Order for serialNumber “TESTApi01” which is already available in store, if all validations are successful).
-
The standard discount for items or customer level discounts will be verified and applied automatically.
-
AutoRenewal flag - There are some validations in the store for autorenewals if those are not satisfied then even if the consumer has sent the autoRenewal value as Y the order will not have autorenewal checkbox checked.
-
When a user wishes to redeem a coupon, the validation process for the coupon will be initiated and executed.
-
The promo code will undergo validation and will be applied at the order level.
-
If the activation date in the payload is past dated then the system will take the current system date as an activation Date.
-
If activationCountry is null then for activation ship_to address country will be picked as activation country.
-
The activation type will be validated, and subsequently, the activation date and time will be verified accordingly.
-
For VRS serial number validation, if the service type includes a SIM card, then the API will validate the SIM card details. Additionally, for all VRS lines, the user must provide a Device Key (Password), which will be validated by the system.
-
Geofence information will be retrieved based on the input provided by the customer.
-
The system will conduct standard validations including credit checks, hold status checks, and any other validations configured according to the setup in the TAP Store.
-
If Order is created in HOLD status, customers have to follow a process similar to the current process when they use the TAP IStore. The support team will take the necessary steps along with the customer to get the order hold released manually after which order confirmation and activation email will be sent. This will be reviewed in onboarding sessions and relevant documentation.
-
The subscriptions for AG 392 model that have not activated their first subscription via the RTX activation portal can not proceed to the next subscription purchase and have to first activate the initial subscription that was part of the bundle that was purchased using the RTX website at start.trimblertx.com/
-
For VRS, if ssoUserEmailAddress is a valid id API use this email Id while creating the order. If the ssoUserEmailAddress is not valid then API will use the latest valid ssoUserEmailAddress from the Store for creating the order. If there is no valid ssoUserEmailAddress available, the API will throw an error “ssoUserEmailAddress not found. Please contact Customer Care”.
-
Service End Date: It will be determined by the item unit of measure and the Service Start Date.
-
Service Start Date: The start date must not exceed 3 days from the current system date.
- If the user enters a date more than 3 days in the future, the system will generate an error.
- If for a serialNumber there is already an existing active service in TAP Store with the same ProductLine (refer #23 for mapping) the new order StartDate will be overridden by previous subscription end_Date+1. In the case of different ProductLine, the API will generate an error response to contact Customer care.
- Exception to the above point is XFill service and Demo parts (explained in above), for which even if there is an active service for other ProductLine exists in store, start_Date of the new order will be payload serviceStartDate.
-
Products to Product Line mapping
Product Product Line All CenterPoint products CENTERPOINT All RangePoint products RANGEPOINT All ViewPoint products VIEWPOINT All FieldPoint products FIELDPOINT All TPS - RTK 900 MHZ products TPS - RTK 900 MHZ All XFILL products XFILL -
The current limit of the maximum number of order lines that can be processed from the API is 20 lines.
-
If the API offers the possibility of purchasing Demo below logic will be in place for DEMO:
- For a given Serial Number for a specific Product Line the Demo is allowed once per lifetime. However, at the time of the request for Demo/trial the Serial number should not have a prior paid active or expired subscription of the same product line. If there is an existing active or expired paid subscription the API will restrict the order creation.
-
List of valid carrierName name:
- T-Mobile Germany
- Bell
- Rogers
- Telekom M2M
- Vodafone Germany over third party supplier Horn and Cosifan
- Telia Sweden
- Vodafone UK
- Vodafone UK over third party supplier Wireless Logic
- Orange UK over third party supplier Wireless Logic
- O2 UK over third party supplier Wireless Logic
- Orange Ireland Wireless Logic
- Unknown
- O2 Ireland Wireless Logic
TAP_RESEND_ACTIVATION_API
The functionality of this API is to resend activation information via OTA to the Device or the passcode will be sent in the email.
Base URI
URI with search parameters
NA
Request Payload Field details:
Parameter Name | Data Type | Description | Sample Values | Required |
---|---|---|---|---|
serialNumber | String | Device Serial number | 1234567890 | Mandatory |
partNumber | String | If there are multiple active services, partNumber parameter can be sent to resend activation/passcode for individual service. | 132001-10 | Optional |
orderNumber | String | To send the activation using the Order Number. | 2342342 | Optional |
customerOrderRef | String | To send the activation using the customerOrderRef. | Order30042024 | Optional |
activationDate | String | On which date should the activation be sent to the customer. Format YYYY-MM-DD hh:mm | 2024-05-26 | Optional |
activationTime | String | On which Time should the activation be sent to the customer. | 16:00 | Optional |
Request Payload:
Success Response Payload:
Error Response Payload:
Responses:
Code | Description |
---|---|
200 | OK |
400 | Bad Request |
401 | Access Token Invalid |
Usage Notes:
- If the serial number has multiple active subscriptions and the customer wishes to retrieve a specific activation detail, the customer must provide the “partNumber” in the request payload.
- The activation method will be fetched from the Passcode mapping (OTA, Send by Email)
- If no results are found with the provided request parameters, the API will return an error message “No data found” with the status code 400.
- NOTE: Upon Requesting a resend to activate the service through OTA through the resend functionalities it will take 15 minutes to complete the activation
Network Connectivity Error Messages
- Timeout - Httpcode - 504
- Timeout - Httpcode - 504 Gateway Time-out error:
- Authentication Failure - Httpcode - 401 Unauthorized
- Access is denied - 503 Service Temporarily unavailable.
POSTMAN Configurations
-
Open Postman application (Download on your laptop or Login via WebBrowser from https://www.postman.com/downloads/
-
There are two options:
- Create a Blank collection and continue to steps 3-9
- Import this collection file: “TAPSTOREAPIs Stage Collection.postman_collection.json” that is shared by the Trimble team and proceed to obtain a token.
- Click “Add a request” hyperlink to create a new request for getting the access token.
-
Rename the new collection as AccessToken and use url as below-
NONPROD - https://stage.id.trimblecloud.com/oauth/token
PROD - https://id.trimble.com/oauth/token
-
Select method as POST
-
In the Body add below parameters: Please refer below screenshot:
grant_type client_credentials
client_id Will be provided during OnBoarding
client_secret Will be provided during OnBoarding
scope tapstoreapis
-
-
After completing Step 4 click the send button and access_token should be generated. In case if the setup is not correct, an appropriate error message will be displayed. This access_token can be used to get the access to the API’s.
- For Accessing the API’s. Create a new Request using the “Add request” option.
- Select the appropriate method (GET or POST) and use the API url mentioned in the User Guide document.
-
Navigate to Headers and add new parameter Authorization and value as Bearer <<access_token generated in Step 5>>.
And Click on Send button. If the request is successful http code 200 will be displayed along with the Response payload.
- For POST requests like createOrder or resendActivation; request payload needs to be entered in the Body per below screenshot.