Why no customerId field in customer create response

Why does the customer creation response object not include the newly created customer_id as a structured field? I know its trivial to parse it from the “location” url, but I’m just curious why the api is forcing you to either re-hit the api (which seems inefficient for both parties) or parse the new id from the “location” url?

Hi @rogerm89, This was an initial API design decision that was made for all 201s to return a link to the created resource in the Location header and an empty body. The idea being, clients should follow the link to get the current state of the resource created. We have received feedback from other developers on the desire to receive the entity in the response in the 201, so it’s definitely something we’ll evaluate from an API change perspective!

Thanks for the explanation, @spencer. Overall, the API has been a pleasure to work with!

1 Like