arazzo: 1.0.1 info: title: Ramp Categorize Transaction To Account summary: Retrieve a transaction and pull the GL account list to support categorization. description: >- Supports general-ledger categorization of card spend. The workflow retrieves a transaction to read its merchant and category hint, then lists the organization's general ledger accounts so a caller can choose the right account to code the transaction against. This adapts an accounting write-back theme to the read-only operations the Ramp Developer API exposes: it gathers the transaction and the chart of accounts the coding decision needs. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: rampApi url: ../openapi/ramp-developer-api-openapi.yml type: openapi workflows: - workflowId: categorize-transaction-to-account summary: Retrieve a transaction and the chart of accounts needed to categorize it. description: >- Retrieves a transaction's merchant and category hint, then lists general ledger accounts so the transaction can be coded to an account. inputs: type: object required: - transactionId properties: accessToken: type: string description: OAuth2 client-credentials bearer token with transactions:read and accounting:read scopes. transactionId: type: string description: The id of the transaction to categorize. pageSize: type: integer description: Number of general ledger accounts to request per page. steps: - stepId: getTransaction description: >- Retrieve the transaction and capture its merchant, amount, and the Ramp-supplied category hint used to suggest a general ledger account. operationId: getTransaction parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: id in: path value: $inputs.transactionId successCriteria: - condition: $statusCode == 200 outputs: merchantName: $response.body#/merchant_name amount: $response.body#/amount categoryId: $response.body#/sk_category_id - stepId: listAccounts description: >- List the organization's general ledger accounts so the transaction can be matched to an account by classification or code. operationId: listAccountingAccounts parameters: - name: Authorization in: header value: Bearer $inputs.accessToken - name: page_size in: query value: $inputs.pageSize successCriteria: - condition: $statusCode == 200 outputs: accounts: $response.body#/data outputs: merchantName: $steps.getTransaction.outputs.merchantName categoryId: $steps.getTransaction.outputs.categoryId accounts: $steps.listAccounts.outputs.accounts