---
title: "Get operation by code"
method: GET
path: "code/{code}"
tags: ["Operations"]
---

# Get operation by code

`GET code/{code}`

## Request

- Base URL: `https://payments.air-pay.io`
- URL: `https://payments.air-pay.io/code/{code}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/airtm/apis/airtm-enterprise-api-v1/docs/code/:code/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint will return an operation corresponding to the specified
`code` used to create a payout.

## Path parameters

- `code` string

## Response `200`

OK

- object
  - `id` string: Unique identifier automatically generated on operation creation.
  - `partner_id` string: ID of the partner who created and committed the operation.
  - `status` string: The status of the operation. Please refer to the Purchases and Payments endpoints to see possible statuses.
  - `amount` string: Amount in USD that was transacted in the operation.
  - `description` string: Description of the operation, inputted in the creation.
  - `confirmation_uri` string: Deprecated. Airtm no longer calls this URL, and new payout requests that include it are rejected. Use webhooks instead.
  - `cancel_uri` string: Deprecated. Airtm no longer calls this URL, and new payout requests that include it are rejected. Use webhooks instead.
  - `code` string: An arbitrary string of the partner’s choosing. Used to identify and correlate Airtm purchases with partner records. Must be unique.
  - `airtm_operation_id` string: Unique identifier for the payout operation within the Airtm system.
  - `created_at` string: Datetime of operation creation.
  - `updated_at` string: Datetime of latest change in the operation.
  - `airtm_user_id` string: The ID of the user involved in the payout/purchase.
  - `airtm_user_email` string: The email of the user involved in the payout/purchase in Airtm.
  - `operation_type` string: Type of operation, can be 'purchase' or 'payout'.
  - `failure_uri` string: Deprecated. Airtm no longer calls this URL, and new payout requests that include it are rejected. Use webhooks instead.
  - `failure_reason` string: This populates with the reason the operation failed.
  - `callback_uri` string: Deprecated. Airtm no longer calls this URL, and new purchase requests that include it are rejected. Use webhooks instead.
  - `airtm_operation_hash` string: Unique hash for the payout operation within the Airtm system.

## Other responses

- `404`: Not Found
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/airtm/apis/airtm-enterprise-api-v1.md) - [All operations](https://skmtc.dev/airtm/apis/airtm-enterprise-api-v1/llms.txt) - [OpenAPI document](https://skmtc.dev/airtm/apis/airtm-enterprise-api-v1/revisions/4e8326a04343?raw)
