Update Finance settings

PUT/finance-settings/{partnerId}

Update Finance settings.

Privileges:

  • biz-core.manage

Audit event:

  • biz.core.v2.finance.settings.update

Errors:

  • BIZ_CORE:FINANCE_SETTINGS_NOTFOUND - Finance settings with given partner id not found.

Validation errors:

  • BIZ_CORE:PARTNER_IN_DRAFT_IS_MANDATORY_AND_MUST_BE_YES_OR_NO - Partner in draft is mandatory and must be yes or no
  • BIZ_CORE:BIZ_EMAIL_ACCOUNT_FOR_GIVEN_ID_NOT_FOUND - Biz email account for given id not found
  • BIZ_CORE:BIZP_EMAIL_CONTACT_FOR_GIVEN_ID_NOT_FOUND - Bizp email contact for given id not found
  • regexNotMatch - Invalid email address. Valid e-mail can contain only latin letters, numbers, '@' and '.'
  • notInArray - Email status can be only to, cc or bcc
  • BIZ_CORE:EMAIL_CONTACT_IS_MANDATORY - Email contact is mandatory
  • BIZ_CORE:HARDCOPY_ADDRESS_IS_DEFAULT_NOT_SUPPORTED - Hardcopy address is not supported
  • BIZ_CORE:ADDRESS_TYPE_HARDCOPY_NOT_FOUND - Address type hardcopy not found
  • BIZ_CORE:HARDCOPY_ADDRESS_ID_NOT_DEFINED - Hardcopy address id not defined
  • BIZ_CORE:HARDCOPY_ADDRESS_IS_EMPTY - Hardcopy address is empty
  • BIZ_CORE:INVOICE_ADDRESS_IS_NOT_VALID - Invoice address is not valid
  • BIZ_CORE:INVOICE_ADDRESS_FOR_GIVEN_ID_NOT_FOUND - Invoice address for given id not found
  • BIZ_CORE:NETTING_PARTNER_IS_NOT_SUPPORTED - Netting partner is not supported
  • BIZ_CORE:NETTING_PARTNER_IS_EMPTY - Netting partner is empty
Base URL
https://api-cpaas.sms.es/biz-core/v2
Authentication

OAuth2 — send Authorization: Bearer <access_token>. Token URL: https://accounts-cpaas.sms.es/oauth2/access-token

Request

Path parameters

partnerIdintegerrequired

Partner ID.

Body

application/json
emailContactobject
Show child attributes
emailAccountIdinteger
emailAddressesobject[]
Show child attributes
addressTypestring
Possible values: to, cc, bcc
eMailstring (email)
hardCopyAddressIsDefaultstring
Possible values: yes, no
invoiceAddressIdinteger
nettingPartnerstring
Possible values: yes, no
partnerInDraftstring
Possible values: yes, no

Request example

cURL · cURL
curl -L -X PUT "https://api-cpaas.sms.es/biz-core/v2/finance-settings/{partnerId}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <access_token>" \
  --data-raw '{
  "emailContact": {
    "emailAccountId": 0,
    "emailAddresses": [
      {
        "addressType": "to",
        "eMail": "user@example.com"
      }
    ]
  },
  "hardCopyAddressIsDefault": "yes",
  "invoiceAddressId": 0,
  "nettingPartner": "yes",
  "partnerInDraft": "yes"
}'

Responses

Finance settings updated successfully

application/json
emailAccountIdinteger
emailAddressBccstring (email)
emailAddressCCstring (email)
emailAddressIsDefaultstring
Possible values: yes, no
emailAddressTOstring (email)
emailContactIdinteger
hardCopyAddressIdinteger
hardCopyAddressIsDefaultstring
Possible values: yes, no
idinteger
invoiceAddressIdinteger
invoiceAddressIsDefaultstring
Possible values: yes, no
nettingPartnerstring
Possible values: yes, no
productIdinteger
productTypestring
smtpAccountstring
Example response
{
  "emailAccountId": 0,
  "emailAddressBcc": "user@example.com",
  "emailAddressCC": "user@example.com",
  "emailAddressIsDefault": "yes",
  "emailAddressTO": "user@example.com",
  "emailContactId": 0,
  "hardCopyAddressId": 0,
  "hardCopyAddressIsDefault": "yes",
  "id": 0,
  "invoiceAddressId": 0,
  "invoiceAddressIsDefault": "yes",
  "nettingPartner": "yes",
  "productId": 0,
  "productType": "string",
  "smtpAccount": "string"
}