Mark as Collected or Shipped

You can mark a Smart Transaction as delivered either in SecuOffice or using the secuconnect API. When the transaction is started with invoice payment, it is mandatory to do this, since the delivery date is needed to calculate the due date.

You can either mark the Smart Transaction as collected. This can only be done once. Or you can mark it as shipped. This can be done several times.

The API endpoint for marking a Smart Transaction to be delivered in full is POST /Smart/Transactions/{id}/setDelivery.

The first example shows how to mark actual collection.

Request
POST /api/v2/Smart/Transactions/STX_FXK7V5OZR8VS9IU4LJXVR503PO2JO1/setDelivery HTTP/1.1
Host: connect-testing.secupay-ag.de
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"delivery_options": {
"type": "collection",
"delivered_at": "2020-07-07T13:01:00+02:00",
"store_id": "STO_F3TP10N3AOEDCDI4LIGKIV6KR78BWY"
}
}

The parameters for collection are:

Parameter


type

Optional. Always collection.

delivered_at

Collection date and time.

store_id

Optional store ID. You can pass another store now.

If everything is fine, the API answers with HTTP status 200 OK, and the full representation of the Smart Transaction:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"object": "smart.transactions",
"id": "STX_33PXAW2YN2NJTPM5KPGMK7QF5PBVA2",
// ...
"status": "ok",
// ...
"delivery_options": {
"type": "collection",
"code": null,
"store_id": "STO_WCH2ABG8T7U8WHWDF3EG5KV2P6C4PM",
"scheduled_slot": {
"start_date": "2020-07-06T12:45:00+02:00",
"end_date": "2020-07-06T14:45:00+02:00"
},
"delivered_at": "2020-07-07T13:01:00+02:00"
},
// ...
}

The passed data are stored. Furthermore the status of the Smart Transaction has changed to collected, if the intent was order. Otherwise it stays ok.

Before you have marked the Smart Transaction as collected, you can also switch to shipping. It uses the same endpoint, but different parameters:

Request
POST /api/v2/Smart/Transactions/STX_33PXAW2YN2NJTPM5KPGMK7QF5PBVA2/setDelivery HTTP/1.1
Host: connect-testing.secupay-ag.de
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"delivery_options": {
"type": "shipping",
"shipped_at": "2020-07-06T12:45:00+02:00",
"shipped_by": "DHL",
"tracking_code": "123456789",
"invoice_number": "RG56324"
}
}

Parameter details in case of shipping:

Parameter

Meaning

type

Always shipping.

shipped_at

Shipping date and time.

shipped_by

Optional name of shipping provider.

tracking_code

Optional tracking code or URL of your shipping provider.

invoice_number

Optional. Your invoice number.

If everything is fine, the API responds with 200 OK and the full representation of the Smart Transaction:

Response
HTTP/1.1 200 OK
Content-Type: application/json
...
 
{
"object": "smart.transactions",
"id": "STX_33PXAW2YN2NJTPM5KPGMK7QF5PBVA2",
// ...
"status": "ok",
// ...
"delivery_options": {
"type": "shipping",
"shipped_at": "2020-07-07T13:01:00+02:00",
"shipped_by": "DHL",
"tracking_code": "123456789",
"invoice_number": "RG56324"
},
// ...
}

In case of an order, this would also change the status of the Smart Transaction to shipped. Otherwise it would stay ok.

As mentioned above, you can track multiple shipments for one Smart Transaction. This will update the detail fields. If you pass no shipping provider, tracking code or invoice number, it will remove them.