Ramp · Arazzo Workflow

Ramp Attribute Transaction To Cardholder

Version 1.0.0

Resolve a transaction's card and user, then pull the user and card directories for attribution.

1 workflow 1 source API 1 provider
View Spec View on GitHub FinanceSpend ManagementCorporate CardsExpense ManagementAccounts PayableBill PayAccountingReimbursementsArazzoWorkflows

Provider

ramp

Workflows

attribute-transaction-to-cardholder
Retrieve a transaction and the card and user directories needed to attribute it.
Retrieves a transaction's card and user references, then lists cards and users so the references can be resolved to human-readable records.
3 steps inputs: accessToken, transactionId outputs: cardId, cards, merchantName, userId, users
1
getTransaction
getTransaction
Retrieve the transaction and capture the card and user it is attributed to.
2
listCards
listCards
List the organization's cards so the transaction's card_id can be resolved to a display name and last four.
3
listUsers
listUsers
List the organization's users so the transaction's user_id can be resolved to a cardholder name and email.

Source API Descriptions

Arazzo Workflow Specification

ramp-attribute-transaction-to-cardholder-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Ramp Attribute Transaction To Cardholder
  summary: Resolve a transaction's card and user, then pull the user and card directories for attribution.
  description: >-
    Builds the data needed to attribute a single transaction to the person and
    card behind it. The workflow retrieves a transaction to read its card_id
    and user_id, then lists the organization's cards and users so a caller can
    match those identifiers against the directories and resolve the cardholder
    name, card display name, and last four. The Ramp Developer API exposes no
    get-card or get-user by id, so the directory lists are the supported way to
    resolve these references. 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: attribute-transaction-to-cardholder
  summary: Retrieve a transaction and the card and user directories needed to attribute it.
  description: >-
    Retrieves a transaction's card and user references, then lists cards and
    users so the references can be resolved to human-readable records.
  inputs:
    type: object
    required:
    - transactionId
    properties:
      accessToken:
        type: string
        description: OAuth2 client-credentials bearer token with transactions:read, cards:read, and users:read scopes.
      transactionId:
        type: string
        description: The id of the transaction to attribute.
  steps:
  - stepId: getTransaction
    description: >-
      Retrieve the transaction and capture the card and user it is attributed
      to.
    operationId: getTransaction
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: id
      in: path
      value: $inputs.transactionId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cardId: $response.body#/card_id
      userId: $response.body#/user_id
      amount: $response.body#/amount
      merchantName: $response.body#/merchant_name
  - stepId: listCards
    description: >-
      List the organization's cards so the transaction's card_id can be
      resolved to a display name and last four.
    operationId: listCards
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      cards: $response.body#/data
  - stepId: listUsers
    description: >-
      List the organization's users so the transaction's user_id can be
      resolved to a cardholder name and email.
    operationId: listUsers
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      users: $response.body#/data
  outputs:
    cardId: $steps.getTransaction.outputs.cardId
    userId: $steps.getTransaction.outputs.userId
    merchantName: $steps.getTransaction.outputs.merchantName
    cards: $steps.listCards.outputs.cards
    users: $steps.listUsers.outputs.users