Collect Schemes

Collect Scheme operations

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/v2/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",
      • "agreement": {
        • "agreementTypesDefinitionVersion": 0,
        • "placeholders": {
          • "clientName": "InsureX"
          }
        },
      • "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/v2/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/v2/schemes/collect/{schemeId}/published
Request samples
Response samples
application/json
{
  • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "agreement": {
    • "agreementTypesDefinitionVersion": 0,
    • "placeholders": {
      • "clientName": "InsureX"
      }
    },
  • "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/v2/schemes/collect/{schemeId}/latest
Request samples
Response samples
application/json
{
  • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "agreement": {
    • "agreementTypesDefinitionVersion": 0,
    • "placeholders": {
      • "clientName": "InsureX"
      }
    },
  • "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/v2/schemes/collect/{schemeId}/drafts/{draftId}
Request samples
Response samples
application/json
{
  • "draftId": "dfb8a430-52c9-4ba8-8878-6bd070da9488",
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "agreement": {
    • "agreementTypesDefinitionVersion": 0,
    • "placeholders": {
      • "clientName": "InsureX"
      }
    },
  • "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/v2/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
required
string

The name of this Scheme.

code
string or null

Optional code to attribute to the Scheme.

agreementType
required
string (AgreementType)
Enum: "SingleUse" "Reuse"
required
object (SchemeAgreementV2)
required
Array of objects (CollectRuleRequest)

A list of the Rules attached to the Scheme.

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.

post/v2/schemes/collect/{schemeId}/drafts
Request samples
{
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "agreement": {
    • "agreementTypesDefinitionVersion": 0,
    • "placeholders": {
      • "clientName": "InsureX"
      }
    },
  • "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",
      • "agreement": {
        • "agreementTypesDefinitionVersion": 0,
        • "placeholders": {
          • "clientName": "InsureX"
          }
        },
      • "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/v2/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",
      • "agreement": {
        • "agreementTypesDefinitionVersion": 0,
        • "placeholders": {
          • "clientName": "InsureX"
          }
        },
      • "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 list of Collect Scheme summaries

Role Requirements

tenant-collect-scheme-read or tenant-admin

Description

Gets a list of all Collect Scheme summaries.

Securitybearer
Request
query Parameters
sortColumn
string
sortDirection
string
searchColumn
string
searchValue
string
isLatestDraftPublished
boolean
from
integer <int32>
Default: 0
take
integer <int32>
Default: 100
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 summaries 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/v2/schemes/collect
Request samples
Response samples
application/json
{
  • "currentPage": 1,
  • "pageCount": 5,
  • "pageSize": 10,
  • "rowCount": 30,
  • "totalCount": 50,
  • "results": [
    • {
      • "schemeId": "string",
      • "name": "string",
      • "code": "string",
      • "latestDraftId": "3c9d3e6a-b749-4243-90f3-c6a0fd7b1172",
      • "publishedDraftId": "f146684a-35bf-4b8f-9c19-2d070befcb82",
      • "isLatestDraftPublished": true,
      • "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
required
string

The name of this Scheme.

code
string or null

Optional code to attribute to the Scheme.

agreementType
required
string (AgreementType)
Enum: "SingleUse" "Reuse"
required
object (SchemeAgreementV2)
required
Array of objects (CollectRuleRequest)

A list of the Rules attached to the Scheme.

Responses
200

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.

post/v2/schemes/collect
Request samples
{
  • "name": "string",
  • "code": "string",
  • "agreementType": "SingleUse",
  • "agreement": {
    • "agreementTypesDefinitionVersion": 0,
    • "placeholders": {
      • "clientName": "InsureX"
      }
    },
  • "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",
      • "agreement": {
        • "agreementTypesDefinitionVersion": 0,
        • "placeholders": {
          • "clientName": "InsureX"
          }
        },
      • "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.