Skip to main content
POST
/
script
Create script
curl --request POST \
  --url https://nitro-script-api.nitrorx.ai/script \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'reference_id=<string>' \
  --form rx_document='@example-file' \
  --form check_signatures=true \
  --form 'entity_code=<string>'
{
  "message": "Script request submitted successfully",
  "data": {
    "script_id": 1,
    "reference_id": "0"
  }
}

Authorizations

Authorization
string
header
required

API Key for authentication

Body

multipart/form-data

Script data that needs to be processed. Run this endpoint in Postman if you are testing this endpoint. rx_document upload file does not work here due to a bug with uploading files from mintlify.

reference_id
string
required

Your internal reference id for this script. The webhook to push the script results back to your system will use this reference_id which will help you associate the script results with the correct script. Pass 0 if you do not have a reference id for this script or you do not want trigger the webhook.

rx_document
file
required

Prescription document file. Following file formats are supported:

  • PDF (single or multiple pages)
  • PNG
  • JPG/JPEG
  • TIFF (single or multiple pages).

Maximum file size is 5MB.

check_signatures
enum<boolean>
default:true

Optional flag to check for signatures authenticity.

  • If true, the script will be checked for signatures authenticity.
  • If false, the script will not be checked for signatures authenticity.

Pass false if there are no doctor signatures on the script.

Available options:
true,
false
entity_code
string

Entity code for the script. This is used to identify the entity that the script belongs to. This is required for scripts that needs entity specific processing. If you do not have an entity code, please do not pass this parameter.

Response

Script submitted successfully response

message
string
Example:

"Script request submitted successfully"

data
object