API Documentation Overview
1. Get Account Details
Endpoint:
GET https://www.mercadodigital.ainfinity.com.br/api/account/details
Descrição: Retrieves details of the account associated with the provided API key.
2. Obtenha todos os itens
Endpoint:
GET https://www.mercadodigital.ainfinity.com.br/api/items/all
Descrição: Recupera todos os itens associados à chave de API fornecida.
3. Get An Item Details
Endpoint:
GET https://www.mercadodigital.ainfinity.com.br/api/items/item
Descrição: Retrieves details of a specific item based on the provided item ID and API key.
4. Purchase Validation
Endpoint:
POST https://www.mercadodigital.ainfinity.com.br/api/purchases/validation
Descrição: Valida um código de compra e retorna detalhes sobre a compra, se válido.
Authentication
Navigate to Workspace Settings
The user should first log in to their account on the platform. Then, they can navigate to the "Settings" section of their workspace.
Locate API Key Section
Within the workspace settings, the user should look for a section specifically labeled "API Key" or "API Access."
Generate or Retrieve API Key
In this section, the user can either generate a new API key or retrieve an existing one if it has been previously generated. If there is an option to generate a new key, the user can click on it to create a fresh API key.
Copiar API Key
Uma vez que a chave de API é gerada ou recuperada, o usuário deve ser capaz de vê-la exibida na tela. Eles podem simplesmente clicar em um botão ou ícone ao lado da chave para copiá-la para sua área de transferência.
Use the API Key
With the API key copied, the user can now use it to authenticate their requests when accessing the platform API endpoints. They typically need to include the API key as part of the request headers or parameters, depending on the API authentication mechanism.
Secure the API Key
É essencial lembrar os usuários de manter suas chaves de API seguras e não compartilhá-las publicamente. Eles devem evitar codificar chaves de API em código do lado do cliente ou compartilhá-las em repositórios acessíveis publicamente. Em vez disso, eles devem considerar armazenar a chave de API com segurança em seus aplicativos do lado do servidor e usar controles de acesso apropriados.
Get Account Details
Retrieves details of the account associated with the provided API key
Endpoint
GEThttps://www.mercadodigital.ainfinity.com.br/api/account/details
Parameters
- api_key: Sua API key
(Obrigatório)
Responses
Success Response:
{
"status": "success",
"data": {
"name": {
"firstname": "John",
"lastname": "Doe",
"full_name": "John Doe"
},
"username": "johndoe",
"email": "john.doe@example.com",
"balance": 100.00,
"currency": "BRL",
"profile": {
"heading": "Profile Heading",
"description": "Profile Description",
"contact": {
"email": "contact@example.com"
},
"social_links": [
"facebook": "/",
"x": "/",
// etc...
],
"media": {
"avatar": "https://example.com/avatar.jpg",
"cover": "https://example.com/cover.jpg"
}
},
"registered_at": "2024-04-27T12:00:00Z"
}
}
Error Response:
{
"status": "error",
"msg": "Invalid request"
}
Obter todos os itens
Recupera todos os itens associados à chave de API fornecida
Endpoint
GEThttps://www.mercadodigital.ainfinity.com.br/api/items/all
Parameters
- api_key: Sua API key
(Obrigatório)
Responses
Success Response:
{
"status": "success",
"items": [
{
"id": 1,
"name": "Sample Item",
"description": "This is a sample item",
"category": "Category Name",
"sub_category": "Subcategory Name",
"options": ["option1", "option2"],
"version": 1.0.0,
"demo_link": "https://example.com/demo",
"tags": ["tag1", "tag2"],
"media": {
"thumbnail": "https://example.com/thumbnail.png",
"preview_image": "https://example.com/preview.jpg", // This is not included for audio items
"preview_video": "https://example.com/video.mp4", // This is only included for video items
"preview_audio": "https://example.com/audio.mp3", // This is only included for audio items
"screenshots": [ // This is only included if item has screenshots
"https://example.com/screenshot1.jpg",
"https://example.com/screenshot2.jpg"
],
},
"price": {
"regular": 19.99,
"extended": 29.99
},
"currency": "BRL",
"published_at": "2024-04-27T12:00:00Z"
},
{
// Next item...
}
]
}
Error Response:
{
"status": "error",
"msg": "Nenhum item encontrado"
}
Get An Item Details
Retrieves details of a specific item based on the provided item ID and API key.
Endpoint
GEThttps://www.mercadodigital.ainfinity.com.br/api/items/item
Parameters
- api_key: Sua API key
(Obrigatório) - item_id: The ID of the item to retrieve
(Obrigatório)
Responses
Success Response:
{
"status": "success",
"item": {
"id": 1,
"name": "Sample Item",
"description": "This is a sample item",
"category": "Category Name",
"sub_category": "Subcategory Name",
"options": ["option1", "option2"],
"version": 1.0.0,
"demo_link": "https://example.com/demo",
"tags": ["tag1", "tag2"],
"media": {
"thumbnail": "https://example.com/thumbnail.png",
"preview_image": "https://example.com/preview.jpg", // This is not included for audio items
"preview_video": "https://example.com/video.mp4", // This is only included for video items
"preview_audio": "https://example.com/audio.mp3", // This is only included for audio items
"screenshots": [ // This is only included if item has screenshots
"https://example.com/screenshot1.jpg",
"https://example.com/screenshot2.jpg"
],
},
"price": {
"regular": 19.99,
"extended": 29.99
},
"currency": "BRL",
"published_at": "2024-04-27T12:00:00Z"
}
}
Error Response:
{
"status": "error",
"msg": "Item Not Found"
}
Purchase Validation
Valida um código de compra e retorna detalhes sobre a compra, se válido.
Endpoint
POSThttps://www.mercadodigital.ainfinity.com.br/api/purchases/validation
Parameters
-
api_key: Sua API key
(Obrigatório). -
purchase_code:
The purchase code to validate
(Obrigatório).
Responses
Success Response:
{
"status": "success",
"data": {
"purchase": {
"purchase_code": "abcdefghijklmnopqrstuvwxyz123456789",
"license_type": "Regular",
"price": 19.99,
"currency": "BRL",
"item": {
"id": 1,
"name": "Sample Item",
"description": "This is a sample item",
"category": "Category Name",
"sub_category": "Subcategory Name",
"options": ["option1", "option2"],
"version": 1.0.0,
"demo_link": "https://example.com/demo",
"tags": ["tag1", "tag2"],
"media": {
"thumbnail": "https://example.com/thumbnail.png",
"preview_image": "https://example.com/preview.jpg", // This is not included for audio items
"preview_video": "https://example.com/video.mp4", // This is only included for video items
"preview_audio": "https://example.com/audio.mp3", // This is only included for audio items
"screenshots": [ This is only included if item has screenshots
"https://example.com/screenshot1.jpg",
"https://example.com/screenshot2.jpg"
],
},
"price": {
"regular": 19.99,
"extended": 29.99
},
"currency": "BRL",
"published_at": "2024-04-27T12:00:00Z"
},
"supported_until": "2024-04-27T12:00:00Z", // Isso não existirá se o suporte estiver desabilitado ou não for suportado
"downloaded": false,
"date": "2024-04-27T12:00:00Z"
}
}
}
Error Response:
{
"status": "error",
"msg": "Código de compra inválido"
}