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 Create Order for Requesting Crypto Codes 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. You can use any API tool to perform the API requests, for example, Postman or Katalon Studio.


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 POST method and the following URL:


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


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


In our example, we are providing the OMS Identifier:


KeyRequired or Optional?TypeAction
omsIdRequiredStringProvide the OMS Identifier.


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. In the body of the request, provide the payload by following the CRTP OMS API specification.


Note: The body of the request is out of control in Movilitas.Cloud. Movilitas.Cloud applies a passthrough of your API request and forwards the request to CRPT OMS without changing the message.


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 POST \
  https://api.movilitas.cloud/v1/movilitas-OMS/api/v2/pharma/orders?omsId=CDF12109-10D3-11E6-8B6F-0050569977A1 \
  -H 'Content-Type: application/json' \
  -H 'clientToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiJzX2FqazQyS2RLQWhHciE3TUZtY1Q2UzhTQ3NDQ2hzc2RoTXRFUlNBIUNwUDhlZDkzU2htQ0hoaHIyTmg3Y0dBIiwiX2lkIjoiNWQyNzA4ZDc3NDQ1OTcxYjI5MmY4ZDI3IiwiaWF0IjoxNTYzOTU3MjA4LCJleHAiOjE1NjQwNDM2MDh9.dYGzl-K1UT8jAeb-XQ0n_chI8VJzKRJiXhtnU4GenPc' \
  -d '{
    "freeCode": true,
    "paymentType": 2,
    "products" : [ {
    "gtin" : "01334567894339",
    "quantity" : 20,
    "serialNumberType" : "SELF_MADE",
    "serialNumbers" : [ "77X4DdOGGDc9d", "6KfL3i7igypkd", "oBtEYaq1HCxHN", "kRGmTQoeOckPx", "KHnFN1fj7NmL6", "LSsbD7BrWRyFX", "rEw3MOgC86H4w", "7WQ4FZapQpacq", "Qaty1C5Imop1O", "mSWjzXd5axLRj", "2sneq3ZzQPxRD", "m6edPWjxsTc6R", "pIfdgy1XyYIkx", "CTQzSe9ZTormg", "dock4TYN5HSkW", "ZA6AITKGQNfO1", "AJfr6XoYxRIHE", "GpxniqfHc6iBA", "57gx4I7fj8J58", "iQ4PtkYIYfxKL" ],
    "templateId":5
    } ],
    "subjectId ":"65468245-fb47-4c8a-af3d-d3486ead8c4a"               
}'



Sample Response (Success 200) 


{
   "omsId" : "CDF12109-10D3-11E6-8B6F-0050569977A1",
   "orderId" : "b024ae09-ef7c-449e-b461-05d8eb116c79",
   "expectedCompleteTimestamp" : 5100
}