PATCH https://external-api.lia.com.br/external_api/v1/products/:id
Body params
| Name | Description | Required | Type |
|---|---|---|---|
| name | Name of your product | true | String |
| full_amount_cents | Full price of your product in cents | true | Integer |
| kind_id | Kind unique identifier | true | String |
| shift_id | Shift unique identifier | true | String |
| access_period | It defines the period your product will be accessible days, period or lifetime | true | String |
| duration_in_days | Total duration in days, mandatory if access_period is days | false | Integer |
| start_date | Date your product will start being available, ISO8601 format, mandatory if access_period is period | false | String |
| end_date | Date your product will stop being available, ISO8601 format, mandatory if access_period is period | false | String |
| description | The description of your product | false | String |
| meta_pixel_code | Your Meta Pixel’s ID, used for tracking | false | String |
| google_pixel_code | Your Google Tag Manager ID, used for tracking | false | String |
| metadata | Save any important data for your integration | false | Hash |
| banner | Image of your product, png, jpeg and webp with less than 500kB | false | Formdata image |
Example request
curl --location --request PATCH 'https://external-api-sandbox.lia.com.br/external_api/v1/products/:id' \
--header 'Authorization: Bearer token' \
--form 'name="Test Product"' \
--form 'full_amount_cents="77777777"' \
--form 'kind_id="95c7a40c-fe12-4459-bc53-7a16cf6b2493"' \
--form 'shift_id="7b062161-db67-4ae4-b591-1ee242dcebb"' \
--form 'access_period="lifetime"' \
--form 'description="Something nice"' \
--form 'meta_pixel_code="some_string"' \
--form 'google_pixel_code="some_string"' \
--form 'metadata[key]="value of metadata key"' \
--form 'banner=@"/path/to/file"'
Example response
{
"id": "ce375417-b11a-527a-85f1-30d1202cd5c3",
"name": "Mentoria",
"full_amount_cents": 299700,
"full_amount_currency": "BRL",
"created_at": "2023-09-21T14:30:07.673-03:00",
"description": null,
"availability": "enabled",
"duration_in_hours": null,
"access_period": "days",
"duration_in_days": 90,
"start_date": null,
"end_date": null,
"meta_pixel_code": "",
"google_pixel_code": "",
"banner_url": null,
"updated_at": "2023-09-21T14:30:07.673-03:00",
"metadata": {},
"company_id": "6883d1f9-0cf0-5167-a6bd-fc57b08454a5",
"formatted_access_period": "90 dias",
"kind": {
"id": "f14e02ca-3175-5468-a3fd-7f6c15393d19",
"name": "Mentoria"
},
"shift": {
"id": "7b062161-db67-4ae4-b591-1ee242dcebb",
"name": "Turno Matutino"
},
"offers": [
{
"id": "c013d81e-57e9-519e-8f3b-8d161568dbca",
"name": "Cartão de Crédito",
"amount_cents": 299700,
"amount_currency": "BRL",
"availability": "enabled",
"created_at": "2023-09-21T14:30:46.636-03:00",
"updated_at": "2023-09-21T14:30:46.636-03:00",
"url": "https://pague.lia.com.br/lia/oferta?offer_id=c013d81e-57e9-519e-8f3b-8d161568dbca",
"smart_payment_enabled": false,
"checkout_type": "default"
}
]
}