Skip to content

Update merchant settings

Request

Updates specific merchant settings, based on the provided fields. Fields not provided will not be updated.

Security
api_key
Bodyapplication/jsonrequired
creditExpirationEnabledbooleanrequired

Whether or not expiring credits is enabled.

creditsEnabledbooleanrequired

Whether or not credits are enabled.

creditDiscountCombinationsobject(CreditDiscountCombinations)required

The merchant's credit discount combinations settings. Fields will default to existing settings OR false if not provided.

uniqueDiscountCodesstringrequired

Whether unique discount codes are enabled for one_time_purchase, subscription, or both.

Enum:"one_time_purchase""subscription""both"
generalDiscountCodesstringrequired

Whether general discount codes are enabled for one_time_purchase, subscription, or both.

Enum:"one_time_purchase""subscription""both"
signUpDiscountsstringrequired

Whether signup discounts are enabled for one_time_purchase, subscription, or both.

Enum:"one_time_purchase""subscription""both"
creditExpirationDaysnumber, >= 1required

The number of days until credits expire after they are created.

curl -i -X PATCH \
  https://public.inveterateapi.com/v2.0/admin/merchant \
  -H 'Content-Type: application/json' \
  -H 'X-Inveterate-Api-Key: YOUR_API_KEY_HERE' \
  -d '{
    "creditExpirationEnabled": true,
    "creditsEnabled": true,
    "creditDiscountCombinations": {
      "productDiscounts": null,
      "orderDiscounts": null,
      "shippingDiscounts": null
    },
    "uniqueDiscountCodes": "one_time_purchase",
    "generalDiscountCodes": "one_time_purchase",
    "signUpDiscounts": "one_time_purchase",
    "creditExpirationDays": 1
  }'

Responses

Returned upon successful direct action to our database. Action is immediate.

Bodyapplication/json
messagestringrequired

The message associated with the response. Generally, the message only confirms the requested action. In the case of errors, the message will give insight into the source of the error.

dataobjectrequired

The data associated with the response. Data is only returned from errors if the error originates from our backend to give further insight into the nature of the error.

Response
{ "message": "Success", "data": { "id": 1, "name": "John Doe" } }