macros
General
Macroid

Run Macro

Execute a macro for an order and run subsequent state transitions.

Overview

  • Method: POST
  • Path: /run-macro/:orderId/:macroId
  • Tags: macros, brand

Parameters

orderId (path)

  • Type: string
  • Required: Yes
  • Description: No description

macroId (path)

  • Type: string
  • Required: Yes
  • Description: No description

Request Body

  • Content Type: application/json
  • Required: Yes

Fields

FieldTypeRequiredDetails

Responses

200

Success

Content Type: application/json

{
  "isSuccessful": true,
  "macroRun": {
    "id": "string",
    "data": {
      "key": null
    },
    "createdAt": "2024-01-01T00:00:00.000Z"
  },
  "stateMachine": {
    "id": "string",
    "order": {
      "id": "string",
      "prescriptionState": {
        "id": "string",
        "name": "string"
      },
      "orderState": {
        "id": "string",
        "name": "string"
      },
      "paymentState": {
        "id": "string",
        "name": "string"
      }
    }
  }
}

400

Validation error

Content Type: application/json

{
  "error": "string",
  "details": [
    {}
  ]
}

Example Usage

curl -X POST \
  https://api.pillexa.com/run-macro/:orderId/:macroId \
  -H "Content-Type: application/json" \
  -d '{"example": "data"}'