← All operations
GET/api/v1/agents/{entityPublicId}/cards

Cards_GetCardsWorkspace

Authentication
required-user
Cache policy
private
Success and errors
200, 400, 401, 403, 404, 409, 422, 500
Stability
v1 stable contract

OpenAPI operation

{
  "operationId": "Cards_GetCardsWorkspace",
  "summary": "GET /api/v1/agents/{entityPublicId}/cards",
  "tags": [
    "Cards"
  ],
  "parameters": [
    {
      "name": "entityPublicId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "format": "uuid",
        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
      }
    }
  ],
  "security": [
    {
      "cookieAuth": []
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "data",
              "meta"
            ],
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "treasury": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "publicId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "state": {
                            "type": "string"
                          },
                          "assetPublicId": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "symbol": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "settledUnits": {
                            "type": "string"
                          },
                          "authorizationHolds": {
                            "type": "string"
                          },
                          "activeReservations": {
                            "type": "string"
                          },
                          "pendingSpend": {
                            "type": "string"
                          },
                          "availableUnits": {
                            "type": "string"
                          },
                          "ledgerAsOf": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                          }
                        },
                        "required": [
                          "publicId",
                          "state",
                          "assetPublicId",
                          "symbol",
                          "settledUnits",
                          "authorizationHolds",
                          "activeReservations",
                          "pendingSpend",
                          "availableUnits",
                          "ledgerAsOf"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "programs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "publicId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "environment": {
                          "type": "string"
                        },
                        "currencies": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "region": {
                          "type": "string"
                        },
                        "cardholders": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "publicId": {
                                "type": "string",
                                "format": "uuid",
                                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                              },
                              "state": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "publicId",
                              "state"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "publicId",
                        "provider",
                        "state",
                        "environment",
                        "currencies",
                        "region",
                        "cardholders"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "settlementAssets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "publicId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "canonicalAssetKey": {
                          "type": "string"
                        },
                        "network": {
                          "type": "string"
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "symbol": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "decimals": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "publicId",
                        "canonicalAssetKey",
                        "network",
                        "name",
                        "symbol",
                        "decimals"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "cards": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "publicId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "provider": {
                          "type": "string"
                        },
                        "state": {
                          "type": "string"
                        },
                        "last4": {
                          "type": "string"
                        },
                        "brand": {
                          "type": "string"
                        },
                        "expiryMonth": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "expiryYear": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "agentEntityPublicId": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "uuid",
                              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "secureDetailsCardReference": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "policy": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "version": {
                                  "type": "integer",
                                  "exclusiveMinimum": 0,
                                  "maximum": 9007199254740991
                                },
                                "state": {
                                  "type": "string"
                                },
                                "currency": {
                                  "type": "string"
                                },
                                "perAuthorizationMaximumMinor": {
                                  "type": "string"
                                },
                                "dailyMaximumMinor": {
                                  "type": "string"
                                },
                                "weeklyMaximumMinor": {
                                  "type": "string"
                                },
                                "monthlyMaximumMinor": {
                                  "type": "string"
                                },
                                "agentBudgetMinor": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "accountBudgetMinor": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "merchantRules": {},
                                "merchantCategoryRules": {},
                                "countryRules": {},
                                "cardPresentAllowed": {
                                  "type": "boolean"
                                },
                                "onlineOnly": {
                                  "type": "boolean"
                                },
                                "recurringAllowed": {
                                  "type": "boolean"
                                },
                                "allowedCurrencies": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "velocityRules": {},
                                "riskTier": {
                                  "type": "string"
                                },
                                "approvalThresholdMinor": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "policyDigest": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "version",
                                "state",
                                "currency",
                                "perAuthorizationMaximumMinor",
                                "dailyMaximumMinor",
                                "weeklyMaximumMinor",
                                "monthlyMaximumMinor",
                                "agentBudgetMinor",
                                "accountBudgetMinor",
                                "merchantRules",
                                "merchantCategoryRules",
                                "countryRules",
                                "cardPresentAllowed",
                                "onlineOnly",
                                "recurringAllowed",
                                "allowedCurrencies",
                                "velocityRules",
                                "riskTier",
                                "approvalThresholdMinor",
                                "policyDigest"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "createdAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                        },
                        "closedAt": {
                          "anyOf": [
                            {
                              "type": "string",
                              "format": "date-time",
                              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "publicId",
                        "provider",
                        "state",
                        "last4",
                        "brand",
                        "expiryMonth",
                        "expiryYear",
                        "agentEntityPublicId",
                        "secureDetailsCardReference",
                        "policy",
                        "createdAt",
                        "closedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "activity": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "publicId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "cardPublicId": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "providerEventId": {
                          "type": "string"
                        },
                        "authorizationId": {
                          "type": "string"
                        },
                        "requestedAmountMinor": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "merchantDescriptor": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "merchantCategory": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "merchantCountry": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "cardPresence": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "state": {
                          "type": "string"
                        },
                        "decision": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "outcome": {
                                  "type": "string"
                                },
                                "reasonCodes": {
                                  "type": "array",
                                  "items": {
                                    "type": "string"
                                  }
                                },
                                "policyVersion": {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                }
                              },
                              "required": [
                                "outcome",
                                "reasonCodes",
                                "policyVersion"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "clearing": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string"
                              },
                              "amountMinor": {
                                "type": "string"
                              },
                              "currency": {
                                "type": "string"
                              },
                              "observedAt": {
                                "type": "string",
                                "format": "date-time",
                                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                              }
                            },
                            "required": [
                              "kind",
                              "amountMinor",
                              "currency",
                              "observedAt"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "observedAt": {
                          "type": "string",
                          "format": "date-time",
                          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                        }
                      },
                      "required": [
                        "publicId",
                        "cardPublicId",
                        "providerEventId",
                        "authorizationId",
                        "requestedAmountMinor",
                        "currency",
                        "merchantDescriptor",
                        "merchantCategory",
                        "merchantCountry",
                        "cardPresence",
                        "state",
                        "decision",
                        "clearing",
                        "observedAt"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "eligibility": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "decision": {
                            "type": "string"
                          },
                          "reasonCodes": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          },
                          "approvedLimitMinor": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "currency": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "validUntil": {
                            "type": "string",
                            "format": "date-time",
                            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                          }
                        },
                        "required": [
                          "decision",
                          "reasonCodes",
                          "approvedLimitMinor",
                          "currency",
                          "validUntil"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "treasury",
                  "programs",
                  "settlementAssets",
                  "cards",
                  "activity",
                  "eligibility"
                ],
                "additionalProperties": false
              },
              "meta": {
                "type": "object",
                "additionalProperties": true,
                "required": [
                  "requestId",
                  "schemaVersion",
                  "buildVersion",
                  "generatedAt",
                  "freshness"
                ],
                "properties": {
                  "requestId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "schemaVersion": {
                    "type": "string"
                  },
                  "buildVersion": {
                    "type": "string"
                  },
                  "generatedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "freshness": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "projectedAt",
                      "sourceWatermark"
                    ],
                    "properties": {
                      "projectedAt": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "sourceWatermark": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "400": {
      "description": "invalid request",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "401": {
      "description": "unauthenticated",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "403": {
      "description": "forbidden",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "404": {
      "description": "not found",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "409": {
      "description": "conflict",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "422": {
      "description": "configuration missing",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    },
    "500": {
      "description": "internal error",
      "content": {
        "application/problem+json": {
          "schema": {
            "$ref": "#/components/schemas/ApiError"
          }
        }
      }
    }
  },
  "x-auth-mode": "required-user",
  "x-cache-policy": "private",
  "x-required-scopes": [],
  "x-rate-cost": 1,
  "x-stability": "STABLE"
}