iotoms Docs

Update a payment mode

PUT
/api/v1/transaction/paymodes/{id}

Updates a payment mode's name, display name, display order and status. name is required on every call; display name and order left out keep their current values, but a missing status resets it to ACTIVE. Returns the payment mode directly, without the status/message envelope.

How to use it

  1. Get the payment mode ID from List payment modes.
  2. Always send name (required, unique). displayName and sequence left out keep their current values; status left out is set back to ACTIVE, so send the current status to keep it.
  3. The updated payment mode is returned directly, without the status/message envelope.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*integer

ID of the record.

Formatint64

Request Body

application/json
  1. body
id?|

Numeric payment mode ID. Set by the server.

Formatint64
name*string

Payment mode code, e.g. CASH or CARD. Required, unique and not blank.

displayName?|

Name shown to staff and on receipts.

sequence?|

Display order; lower numbers are shown first.

Formatint32
status*string

ACTIVE, INACTIVE, ARCHIVED or DELETED. Defaults to ACTIVE.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"
modifiedTime*string

Timestamp stored when the payment mode was created (ISO 8601). Updates do not change it.

Formatdate-time

Response Body

OK

*/*
  1. response
id?|

Numeric payment mode ID. Set by the server.

Formatint64
name*string

Payment mode code, e.g. CASH or CARD. Required, unique and not blank.

displayName?|

Name shown to staff and on receipts.

sequence?|

Display order; lower numbers are shown first.

Formatint32
status*string

ACTIVE, INACTIVE, ARCHIVED or DELETED. Defaults to ACTIVE.

Value in"ACTIVE""INACTIVE""ARCHIVED""DELETED"
modifiedTime*string

Timestamp stored when the payment mode was created (ISO 8601). Updates do not change it.

Formatdate-time
Example Request
curl -X PUT 'https://beta.iotoms.com/api/v1/transaction/paymodes/0' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "status": "ACTIVE",  "modifiedTime": "2019-08-24T14:15:22Z"}'
Example Response
{  "id": 0,  "name": "string",  "displayName": "string",  "sequence": 0,  "status": "ACTIVE",  "modifiedTime": "2019-08-24T14:15:22Z"}