arazzo: 1.0.1
info:
title: Tango Freeze and Cancel a Line Item
summary: Freeze a line item to suspend delivery, then cancel it and confirm the cancellation.
description: >-
A fraud or error mitigation pattern. The workflow freezes a line item to
immediately suspend its delivery, cancels the now-frozen item so it will not
be fulfilled, and reads the line item back to confirm the cancelled status.
Every step spells out its request inline so the flow can be read and executed
without opening the underlying OpenAPI description. Authentication uses the
platform's HTTP Basic credentials declared by the basicAuth security scheme;
those credentials are applied at the transport layer and are not request
parameters.
version: 1.0.0
sourceDescriptions:
- name: lineItemsApi
url: ../openapi/tango-line-items-api-openapi.yml
type: openapi
workflows:
- workflowId: freeze-and-cancel-line-item
summary: Freeze a line item, cancel it, then confirm the cancellation.
description: >-
Suspends delivery of a line item by freezing it, cancels it, and reads the
item back to confirm it is cancelled.
inputs:
type: object
required:
- referenceLineItemId
properties:
referenceLineItemId:
type: string
description: Reference id of the line item to freeze and cancel.
steps:
- stepId: freezeLineItem
description: >-
Freeze the line item to immediately suspend its delivery.
operationId: freezeLineItem
parameters:
- name: referenceLineItemId
in: path
value: $inputs.referenceLineItemId
successCriteria:
- condition: $statusCode == 200
outputs:
referenceLineItemId: $response.body#/referenceLineItemId
lineItemStatus: $response.body#/status
- stepId: cancelLineItem
description: >-
Cancel the frozen line item so it will not be fulfilled.
operationId: cancelLineItem
parameters:
- name: referenceLineItemId
in: path
value: $steps.freezeLineItem.outputs.referenceLineItemId
successCriteria:
- condition: $statusCode == 200
outputs:
referenceLineItemId: $response.body#/referenceLineItemId
lineItemStatus: $response.body#/status
- stepId: confirmCancelled
description: >-
Read the line item back to confirm it is now cancelled.
operationId: getLineItem
parameters:
- name: referenceLineItemId
in: path
value: $steps.cancelLineItem.outputs.referenceLineItemId
successCriteria:
- condition: $statusCode == 200
outputs:
lineItemStatus: $response.body#/status
outputs:
referenceLineItemId: $steps.cancelLineItem.outputs.referenceLineItemId
finalStatus: $steps.confirmCancelled.outputs.lineItemStatus
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.