Can you update autonumber field vis PUT REST API

I am thinking about adding my own ID field to Deal API but I would much prefer to use the Authnumber field. So I was thinking that for now I add my own custom auto-number field with a custom app and when Freshworks releases auto number field to Deals, I switch to that and populate existing deals with the field we added.

To see if this would work I tried to update the value of autonumber field for one of our accounts. The PUT API call succeeds but the autonumber field does not change.

So either this is not supported (ok find, it is just a nice to have) or it I’m doing it wrong. Below is my API call. Does anyone know if autonumber update is possible via PUT API?

curl --location --request PUT 'https://***.myfreshworks.com/crm/sales/api/sales_accounts/16000866818' \
--header 'Content-Type: application/json' \
--header 'Authorization: Token token=***' \
--data-raw '{
    "sales_account": {
        "custom_field": {
            "cf_partner_code": "PC1003"
        }
    }
}

TL;DR No.

The features list of Auto-number Field says: “The auto-number increments by a value of 1 which cannot be changed.” This extends to the REST API.

To test it out, I tried updating an Auto-number field:

curl --location --request PUT 'https://xxxx.myfreshworks.com/crm/sales/api/sales_accounts/76543212345' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Token token=Xxxx_xxx \
--data-raw '{
    "sales_account": {
        "custom_field": {
            "cf_auto_number": "AN0003" // was AN0002
        }
    }
}'

The operation returned HTTP 200, but the Auto-number field’s value doesn’t change. The response contained AN0002. The same result as you mentioned.

1 Like