Collect Schemes

Collect Scheme operations

Get list of Collect Schemes

Role Requirements

tenant-collect-scheme-read or tenant-admin

Description

Gets a list of all Collect Schemes.

Securitybearer
Request
header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Collect Schemes response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

get/v1/schemes/collect
Request samples
Response samples
application/json
{
  • "schemes": [
    • {
      • "schemeId": "string",
      • "publishedDraftId": "f146684a-35bf-4b8f-9c19-2d070befcb82",
      • "drafts": [
        • {
          • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
          • "name": "string",
          • "code": "string",
          • "agreementType": "SingleUse",
          • "rules": [
            • {
              • "priority": 0,
              • "currencies": [
                • null
                ],
              • "countries": [
                • null
                ],
              • "highValueInclusive": 0,
              • "lowValueInclusive": 0,
              • "apps": [
                • null
                ]
              }
            ],
          • "lastModified": "2019-08-24T14:15:22Z"
          }
        ]
      }
    ]
}

Create a new Collect Scheme

Role Requirements

tenant-collect-scheme-write or tenant-admin

Description

Creates a new Collect Scheme.

Securitybearer
Request
header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Request Body schema:
name
string or null

The name of this Scheme.

code
string or null

Optional code to attribute to the Scheme.

agreementType
string (AgreementType)
Enum: "SingleUse" "Reuse"
Array of objects or null (CollectRuleRequest)

A list of the Rules attached to the Scheme.

Responses
200

Returns the Collect Scheme response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

post/v1/schemes/collect
Request samples
{
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "rules": [
    • {
      • "currencies": [
        • "string"
        ],
      • "countries": [
        • "string"
        ],
      • "highValueInclusive": "string",
      • "lowValueInclusive": "string",
      • "apps": [
        • {
          • "appId": "string",
          • "excludedPaymentMethods": [
            • "string"
            ]
          }
        ]
      }
    ]
}
Response samples
application/json
{
  • "schemeId": "string",
  • "publishedDraftId": "f146684a-35bf-4b8f-9c19-2d070befcb82",
  • "drafts": [
    • {
      • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
      • "name": "string",
      • "code": "string",
      • "agreementType": "SingleUse",
      • "rules": [
        • {
          • "priority": 0,
          • "currencies": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "symbol": "string",
              • "numberOfDecimalPlaces": 0
              }
            ],
          • "countries": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "currency": {
                • "id": null,
                • "code": null,
                • "numeric": null,
                • "name": null,
                • "symbol": null,
                • "numberOfDecimalPlaces": null
                }
              }
            ],
          • "highValueInclusive": 0,
          • "lowValueInclusive": 0,
          • "apps": [
            • {
              • "appId": "string",
              • "availablePaymentMethods": [
                • null
                ],
              • "excludedPaymentMethods": [
                • null
                ]
              }
            ]
          }
        ],
      • "lastModified": "2019-08-24T14:15:22Z"
      }
    ]
}

Get a Collect Scheme

Role Requirements

tenant-collect-scheme-read or tenant-admin

Description

Gets a Collect Scheme by the schemeId.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Collect Scheme response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

get/v1/schemes/collect/{schemeId}
Request samples
Response samples
application/json
{
  • "schemeId": "string",
  • "publishedDraftId": "f146684a-35bf-4b8f-9c19-2d070befcb82",
  • "drafts": [
    • {
      • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
      • "name": "string",
      • "code": "string",
      • "agreementType": "SingleUse",
      • "rules": [
        • {
          • "priority": 0,
          • "currencies": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "symbol": "string",
              • "numberOfDecimalPlaces": 0
              }
            ],
          • "countries": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "currency": {
                • "id": null,
                • "code": null,
                • "numeric": null,
                • "name": null,
                • "symbol": null,
                • "numberOfDecimalPlaces": null
                }
              }
            ],
          • "highValueInclusive": 0,
          • "lowValueInclusive": 0,
          • "apps": [
            • {
              • "appId": "string",
              • "availablePaymentMethods": [
                • null
                ],
              • "excludedPaymentMethods": [
                • null
                ]
              }
            ]
          }
        ],
      • "lastModified": "2019-08-24T14:15:22Z"
      }
    ]
}

Delete a Collect Scheme

Role Requirements

tenant-collect-scheme-write or tenant-admin

Description

Delete a Collect Scheme by the schemeId.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
204

No Content

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

delete/v1/schemes/collect/{schemeId}
Request samples

Gets the published Collect Scheme draft

Role Requirements

tenant-collect-scheme-read or tenant-admin

Description

Gets the published draft of a Collect Scheme by the schemeId.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Collect Draft response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

get/v1/schemes/collect/{schemeId}/published
Request samples
Response samples
application/json
{
  • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "rules": [
    • {
      • "priority": 0,
      • "currencies": [
        • {
          • "id": "string",
          • "code": "string",
          • "numeric": 0,
          • "name": "string",
          • "symbol": "string",
          • "numberOfDecimalPlaces": 0
          }
        ],
      • "countries": [
        • {
          • "id": "string",
          • "code": "string",
          • "numeric": 0,
          • "name": "string",
          • "currency": {
            • "id": "string",
            • "code": "string",
            • "numeric": 0,
            • "name": "string",
            • "symbol": "string",
            • "numberOfDecimalPlaces": 0
            }
          }
        ],
      • "highValueInclusive": 0,
      • "lowValueInclusive": 0,
      • "apps": [
        • {
          • "appId": "string",
          • "availablePaymentMethods": [
            • "string"
            ],
          • "excludedPaymentMethods": [
            • "string"
            ]
          }
        ]
      }
    ],
  • "lastModified": "2019-08-24T14:15:22Z"
}

Gets the latest Collect Scheme draft

Role Requirements

tenant-collect-scheme-read or tenant-admin

Description

Gets the latest draft of a Collect Scheme by the schemeId.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Collect Draft response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

get/v1/schemes/collect/{schemeId}/latest
Request samples
Response samples
application/json
{
  • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "rules": [
    • {
      • "priority": 0,
      • "currencies": [
        • {
          • "id": "string",
          • "code": "string",
          • "numeric": 0,
          • "name": "string",
          • "symbol": "string",
          • "numberOfDecimalPlaces": 0
          }
        ],
      • "countries": [
        • {
          • "id": "string",
          • "code": "string",
          • "numeric": 0,
          • "name": "string",
          • "currency": {
            • "id": "string",
            • "code": "string",
            • "numeric": 0,
            • "name": "string",
            • "symbol": "string",
            • "numberOfDecimalPlaces": 0
            }
          }
        ],
      • "highValueInclusive": 0,
      • "lowValueInclusive": 0,
      • "apps": [
        • {
          • "appId": "string",
          • "availablePaymentMethods": [
            • "string"
            ],
          • "excludedPaymentMethods": [
            • "string"
            ]
          }
        ]
      }
    ],
  • "lastModified": "2019-08-24T14:15:22Z"
}

Get a Collect Scheme draft

Role Requirements

tenant-collect-scheme-read or tenant-admin

Description

Gets a Collect Scheme draft by the schemeId and draftId.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

draftId
required
string

The Draft Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Collect Draft response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

get/v1/schemes/collect/{schemeId}/drafts/{draftId}
Request samples
Response samples
application/json
{
  • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "rules": [
    • {
      • "priority": 0,
      • "currencies": [
        • {
          • "id": "string",
          • "code": "string",
          • "numeric": 0,
          • "name": "string",
          • "symbol": "string",
          • "numberOfDecimalPlaces": 0
          }
        ],
      • "countries": [
        • {
          • "id": "string",
          • "code": "string",
          • "numeric": 0,
          • "name": "string",
          • "currency": {
            • "id": "string",
            • "code": "string",
            • "numeric": 0,
            • "name": "string",
            • "symbol": "string",
            • "numberOfDecimalPlaces": 0
            }
          }
        ],
      • "highValueInclusive": 0,
      • "lowValueInclusive": 0,
      • "apps": [
        • {
          • "appId": "string",
          • "availablePaymentMethods": [
            • "string"
            ],
          • "excludedPaymentMethods": [
            • "string"
            ]
          }
        ]
      }
    ],
  • "lastModified": "2019-08-24T14:15:22Z"
}

Delete a Collect Scheme draft

Role Requirements

tenant-collect-scheme-write or tenant-admin

Description

Delete a Collect Scheme draft by the schemeId and draftId.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

draftId
required
string

The Draft Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
204

No Content

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

delete/v1/schemes/collect/{schemeId}/drafts/{draftId}
Request samples

Create new draft for a Collect Scheme

Role Requirements

tenant-collect-scheme-write or tenant-admin

Description

Creates a new draft for an existing Collect Scheme.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Request Body schema:
name
string or null

The name of this Scheme.

code
string or null

Optional code to attribute to the Scheme.

agreementType
string (AgreementType)
Enum: "SingleUse" "Reuse"
Array of objects or null (CollectRuleRequest)

A list of the Rules attached to the Scheme.

Responses
200

OK - Returns the Collect Scheme response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

post/v1/schemes/collect/{schemeId}/drafts
Request samples
{
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "rules": [
    • {
      • "currencies": [
        • "string"
        ],
      • "countries": [
        • "string"
        ],
      • "highValueInclusive": "string",
      • "lowValueInclusive": "string",
      • "apps": [
        • {
          • "appId": "string",
          • "excludedPaymentMethods": [
            • "string"
            ]
          }
        ]
      }
    ]
}
Response samples
application/json
{
  • "schemeId": "string",
  • "publishedDraftId": "f146684a-35bf-4b8f-9c19-2d070befcb82",
  • "drafts": [
    • {
      • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
      • "name": "string",
      • "code": "string",
      • "agreementType": "SingleUse",
      • "rules": [
        • {
          • "priority": 0,
          • "currencies": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "symbol": "string",
              • "numberOfDecimalPlaces": 0
              }
            ],
          • "countries": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "currency": {
                • "id": null,
                • "code": null,
                • "numeric": null,
                • "name": null,
                • "symbol": null,
                • "numberOfDecimalPlaces": null
                }
              }
            ],
          • "highValueInclusive": 0,
          • "lowValueInclusive": 0,
          • "apps": [
            • {
              • "appId": "string",
              • "availablePaymentMethods": [
                • null
                ],
              • "excludedPaymentMethods": [
                • null
                ]
              }
            ]
          }
        ],
      • "lastModified": "2019-08-24T14:15:22Z"
      }
    ]
}

Publish a draft for a Collect Scheme

Role Requirements

tenant-collect-scheme-write or tenant-admin

Description

Publishes a draft for a Collect Scheme by the schemeId and draftId.

Securitybearer
Request
path Parameters
schemeId
required
string

The Scheme Id.

draftId
required
string

The Draft Id.

header Parameters
x-account-id
required
string

The Account Id.

x-tenant-id
required
string

The Tenant Id.

x-correlation-id
string

Correlation Id for the request.

Responses
200

OK - Returns the Collect Scheme response.

400

Bad Request - Returns the Error response object.

401

Unauthorised

403

Forbidden - If the API user does not have one of the roles listed in Role Requirements above.

post/v1/schemes/collect/{schemeId}/drafts/{draftId}/publish
Request samples
Response samples
application/json
{
  • "schemeId": "string",
  • "publishedDraftId": "f146684a-35bf-4b8f-9c19-2d070befcb82",
  • "drafts": [
    • {
      • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
      • "name": "string",
      • "code": "string",
      • "agreementType": "SingleUse",
      • "rules": [
        • {
          • "priority": 0,
          • "currencies": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "symbol": "string",
              • "numberOfDecimalPlaces": 0
              }
            ],
          • "countries": [
            • {
              • "id": "string",
              • "code": "string",
              • "numeric": 0,
              • "name": "string",
              • "currency": {
                • "id": null,
                • "code": null,
                • "numeric": null,
                • "name": null,
                • "symbol": null,
                • "numberOfDecimalPlaces": null
                }
              }
            ],
          • "highValueInclusive": 0,
          • "lowValueInclusive": 0,
          • "apps": [
            • {
              • "appId": "string",
              • "availablePaymentMethods": [
                • null
                ],
              • "excludedPaymentMethods": [
                • null
                ]
              }
            ]
          }
        ],
      • "lastModified": "2019-08-24T14:15:22Z"
      }
    ]
}
Copyright 2024 Duck Creek Technologies. All Rights Reserved.