{
 "openapi": "3.1.0",
 "info": {
  "title": "EDI Interchanges (Supply Chain)",
  "version": "20261030b",
  "description": "Every interchange sent or received: the control numbers, the status, the acknowledgement, the faults in sentences, the documents it made, and the file exactly as it was."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "edi-interchanges": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "interchange_no": {
      "type": "string",
      "description": "Interchange no",
      "readOnly": true
     },
     "partner_id": {
      "type": "string",
      "format": "uuid",
      "description": "Partner id",
      "readOnly": true
     },
     "direction": {
      "type": "string",
      "description": "Direction",
      "readOnly": true
     },
     "standard": {
      "type": "string",
      "description": "Standard",
      "readOnly": true
     },
     "version": {
      "type": "string",
      "description": "Version",
      "readOnly": true
     },
     "doc_type": {
      "type": "string",
      "description": "Doc type",
      "readOnly": true
     },
     "control_no": {
      "type": "string",
      "description": "Control no",
      "readOnly": true
     },
     "group_control_no": {
      "type": "string",
      "description": "Group control no",
      "readOnly": true
     },
     "set_control_nos": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Set control nos",
      "readOnly": true
     },
     "sender_id": {
      "type": "string",
      "description": "Sender id",
      "readOnly": true
     },
     "receiver_id": {
      "type": "string",
      "description": "Receiver id",
      "readOnly": true
     },
     "usage_indicator": {
      "type": "string",
      "description": "Usage indicator",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "ack_status": {
      "type": "string",
      "description": "Ack status",
      "readOnly": true
     },
     "ack_interchange_id": {
      "type": "string",
      "format": "uuid",
      "description": "Ack interchange id",
      "readOnly": true
     },
     "acknowledges_id": {
      "type": "string",
      "format": "uuid",
      "description": "Acknowledges id",
      "readOnly": true
     },
     "raw_payload": {
      "type": "string",
      "description": "Raw payload",
      "readOnly": true
     },
     "payload_sha256": {
      "type": "string",
      "description": "Payload sha256",
      "readOnly": true
     },
     "file_name": {
      "type": "string",
      "description": "File name",
      "readOnly": true
     },
     "segment_count": {
      "type": "integer",
      "description": "Segment count",
      "readOnly": true
     },
     "transaction_count": {
      "type": "integer",
      "description": "Transaction count",
      "readOnly": true
     },
     "errors": {
      "type": "object",
      "description": "Errors",
      "readOnly": true
     },
     "source_type": {
      "type": "string",
      "description": "Source type",
      "readOnly": true
     },
     "source_id": {
      "type": "string",
      "format": "uuid",
      "description": "Source id",
      "readOnly": true
     },
     "source_no": {
      "type": "string",
      "description": "Source no",
      "readOnly": true
     },
     "documents": {
      "type": "object",
      "description": "Documents",
      "readOnly": true
     },
     "transport": {
      "type": "string",
      "description": "Transport",
      "readOnly": true
     },
     "transport_ref": {
      "type": "string",
      "description": "Transport ref",
      "readOnly": true
     },
     "transport_note": {
      "type": "string",
      "description": "Transport note",
      "readOnly": true
     },
     "sent_at": {
      "type": "string",
      "format": "date-time",
      "description": "Sent at",
      "readOnly": true
     },
     "received_at": {
      "type": "string",
      "format": "date-time",
      "description": "Received at",
      "readOnly": true
     },
     "processed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Processed at",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/scm/edi-interchanges": {
   "get": {
    "summary": "list edi-interchanges",
    "operationId": "list_edi_interchanges_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post edi interchanges",
    "operationId": "action_edi_interchanges_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/{id}": {
   "get": {
    "summary": "get edi-interchanges",
    "operationId": "get_edi_interchanges_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put edi interchanges",
    "operationId": "action_edi_interchanges_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete edi interchanges",
    "operationId": "action_edi_interchanges_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/send": {
   "post": {
    "summary": "Send",
    "operationId": "action_edi_interchanges_0_5",
    "description": "Body keys: sourceType*, sourceId, partnerId, ackType; ackType one of AT|AC|RJ",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/{id}/transmit": {
   "post": {
    "summary": "Transmit",
    "operationId": "action_edi_interchanges_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/receive": {
   "post": {
    "summary": "Receive",
    "operationId": "action_edi_interchanges_0_5",
    "description": "Body keys: fileName, partnerId",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/validate": {
   "post": {
    "summary": "Validate",
    "operationId": "action_edi_interchanges_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/{id}/reprocess": {
   "post": {
    "summary": "Reprocess",
    "operationId": "action_edi_interchanges_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/{id}/download": {
   "get": {
    "summary": "Download",
    "operationId": "action_edi_interchanges_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/{id}/sets": {
   "get": {
    "summary": "Sets",
    "operationId": "action_edi_interchanges_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/scm/edi-interchanges/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_edi_interchanges_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}