The Movilitas OMS API is an extension of Movilitas.Cloud that enables third-party systems to send CRPT OMS messages through Movilitas.Cloud to CRPT OMS. Movilitas.Cloud makes your system compliant with the security standards set by CRPT OMS.

  • CRPT stands for Advanced Technology Development Center in Russia.
  • OMS stands for Order Management Station.


The Movilitas OMS API uses the Representational State Transfer (REST) standard to interact with other systems.


Movilitas.Cloud applies a passthrough of your API request and forwards the request to CRPT OMS without changing the message. Also, Movilitas.Cloud returns the response from CRPT OMS to your system without any change.



This article describes how to send the Get Crypto Codes for the Order request to Movilitas.Cloud by using the Movilitas OMS API.


API Tool to Use


In this document, we provide examples by using the cURL command-line tool. To send the API request, you can find a lot of user-friendly REST API tools on the Internet, for example, Postman.


Before You Begin


Make sure that:

  • You have configured an MDLP (Foreign) Channel. For more information, see Configuring MDLP (Foreign) Channel.
  • You have configured a CRPT OMS (Foreign) Channel. For more information, see Configuring CRPT OMS (Foreign) Channel.
  • You have created an API key and generated a static authentication token. You will need the static token for each request. For more information, see Managing API Keys and Static Token.
  • You have access to the CRPT OMS API specification (outside Movilitas.Cloud). As Movilitas.Cloud does not have control over the message, use it as a reference regarding the exact structure of CRPT OMS messages.


Procedure


1. Use the GET method and the following URL:


https://api.movilitas.cloud/v1/movilitas-OMS/api/v2/pharma/codes


2. Define the query string params by following the CRPT OMS API specification.


In our example, we are providing the following parameters:


KeyRequired or Optional?TypeAction
omsIdRequiredStringProvide the OMS Identifier.
orderIdRequiredStringProvide the unique OMS Order Identifier.
gtinRequiredStringProvide the product code (GTIN).
quantityRequiredIntegerProvide the quantity of the requested codes.
lastBlockIdOptionalStringProvide the ID of the block of codes issued in the previous request.


For a detailed description of these parameters, see the CRPT OMS API specification (outside Movilitas.Cloud).


3. For the header, define the following:


KeyRequired or Optional?TypeAction
Content-TypeRequiredStringApply JSON format for the content. Use the value application/json.
clientTokenRequiredStringProvide the Movilitas.Cloud static authentication token.


4. Leave the body of the request empty.


5. Send the request. Movilitas.Cloud forwards your request to CRPT OMS and immediately returns the response from CRPT OMS.


Sample cURL Request  


curl -X GET \
  https://api.movilitas.cloud/v1/movilitas-OMS/api/v2/pharma/codes?orderId=b024ae09-ef7c-449e-b461-05d8eb116c79&gtin=01334567894339&quantity=15&lastBlockId=0&omsId=CDF12109-10D3-11E6-8B6F-0050569977A1 \
  -H 'Content-Type: application/json' \
  -H 'clientToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJzX2FqazQyS2RLQWhHciE3TUZtY1Q2UzhTQ3NDQ2hzc2RoTXRFUlNBIUNwUDhlZDkzU2htQ0hoaHIyTmg3Y0dBIiwiX2lkIjoiNWQyNzA4ZDc3NDQ1OTcxYjI5MmY4ZDI3IiwiaWF0IjoxNTYzOTU3MjA4LCJleHAiOjE1NjQwNDM2MDh9.dYGzl-K1UT8jAeb-XQ0n_chI8VJzKRJiXhtnU4GenPc'



Sample Response (Success 200)


{
   "omsId" : "CDF12109-10D3-11E6-8B6F-0050569977A1",
   "codes" : [
"010460165303004621u003drxdv3Mu0\u001d91VXQI\u001d92X8s451dPdmHvUKs6cTvZgqTFvvagZl/NFVUNwo+ufaM= "],
   "blockId" : "CAF16549-15B1-11E6-8A4F-0056563378A1"
}