POST
/
attach
import { Autumn as autumn } from 'autumn-js'

const response = await autumn.attach({
customer_id: 'user_123',
product_id: 'pro'
})
{
  "customer_id": "a",
  "product_ids": [
    "pro"
  ],
  "code": "updated_product_successfully",
  "message": "Successfully updated product"
}
If the customer_id you send doesn’t already exist, Autumn will automatically create a new customer. You can optionally set the properties of this new customer through the customer_data field.

Authorizations

Authorization
string
header
required

Use your Autumn Secret Key as the Bearer token.

Body

application/json

The body is of type object.

Response

200 - application/json

Customer attached

The response is of type object.