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": "8538ab61-1c4f-404b-8cfe-0dbab2bedc09",
"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": "6cdfdd04-ab2d-48ef-81bf-3e53ebc5644a",
"formatted_access_period": "90 dias",
"kind": {
"id": "bba09b78-6d27-449a-a67a-cbe207f39f83",
"name": "Mentoria"
},
"shift": {
"id": "7b062161-db67-4ae4-b591-1ee242dcebb",
"name": "Turno Matutino"
},
"offers": [
{
"id": "f429f9de-7f34-4957-93ef-ba9d773be7c5",
"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=f429f9de-7f34-4957-93ef-ba9d773be7c5",
"smart_payment_enabled": false,
"checkout_type": "default"
}
]
}