> For the complete documentation index, see [llms.txt](https://dg-market.gitbook.io/dg-live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dg-market.gitbook.io/dg-live/business-manager/api-reference.md).

# API Reference

## Returns a website containing an image from the metamarket

<mark style="color:blue;">`GET`</mark> `https://business.dglive.org/api/tokenImage/Token ID/NFT Addr`

Simply input the token ID and NFT Address of the NFT in the query params to get as a response the image that represents that token.&#x20;

#### Query Parameters

| Name                                       | Type    | Description                                  |
| ------------------------------------------ | ------- | -------------------------------------------- |
| Token ID<mark style="color:red;">\*</mark> | Varchar | The Token ID of the NFT you want to retrieve |
| NFT Addr<mark style="color:red;">\*</mark> | Varchar | The address of the NFT you want to retrieve  |

{% tabs %}
{% tab title="200: OK Returns the requested image URL" %}
<https://business.dglive.org/api/tokenImage/15/0x06bbacfa34951cc5f0f349d7769a24c02373ccfd>
{% endtab %}
{% endtabs %}

## Returns the requested image URL from the metamarket in json format

<mark style="color:blue;">`GET`</mark> `https://business.dglive.org/api/getSlotImageURL/Token ID/NFT Addr`

curl <https://business.dglive.org/api/getSlotImageURL/15/0x06bbacfa34951cc5f0f349d7769a24c02373ccfd> -H "Accept: application/json"

#### Query Parameters

| Name                                       | Type    | Description                                  |
| ------------------------------------------ | ------- | -------------------------------------------- |
| Token ID<mark style="color:red;">\*</mark> | Varchar | The Token ID of the NFT you want to retrieve |
| NFT Addr<mark style="color:red;">\*</mark> | Varchar | The address of the NFT you want to retrieve  |

{% tabs %}
{% tab title="200: OK " %}
{"url":"<https://ipfs.io/ipfs/QmZfyEpJtVV3EGCUQEv4j8GafwB3ZEjw7CahjJcZTgpVe6"}>
{% endtab %}
{% endtabs %}

## getAllMarketSlots

<mark style="color:blue;">`GET`</mark> `https://business.dglive.org/api/getAllMarketSlots/User ID/Slot ID`

Returns the slots from the specified user and specified scenes<br>

#### Query Parameters

| Name                                       | Type | Description                                      |
| ------------------------------------------ | ---- | ------------------------------------------------ |
| User ID<mark style="color:red;">\*</mark>  | Int  | The user ID of the slot you want to retrieve     |
| Slot ID <mark style="color:red;">\*</mark> | Int  | The ID of the specific slot you want to retrieve |

{% tabs %}
{% tab title="200: OK " %}
\[{"id":"1","id\_user":"1","id\_zone":"1","name":"Example","status":"1","pos\_x":"1","pos\_y":"1","pos\_z":"1","size\_x":"1","size\_y":"1","size\_z":"1","rot\_x":"1","rot\_y":"1","rot\_z":"1","token\_id":"10","price":100,"resource\_id":"99","wallet":"0xfollowWallet","address":"0xnftAddress"}]
{% endtab %}
{% endtabs %}

<mark style="color:blue;">`GET`</mark> `https://business.dglive.org/api/getSlotsByZone/Scene ID`

curl <https://business.dglive.org/api/getSlotsByZone/1> -H "Accept: application/json"

#### Query Parameters

| Name                                       | Type | Description                                             |
| ------------------------------------------ | ---- | ------------------------------------------------------- |
| Scene ID<mark style="color:red;">\*</mark> | Int  | The ID of the scene you want to retrieve the slots from |

{% tabs %}
{% tab title="200: OK " %}
\[{"id":"1","id\_user":"1","id\_zone":"1","name":"Example","status":"1","pos\_x":"1","pos\_y":"1","pos\_z":"1","size\_x":"1","size\_y":"1","size\_z":"1","rot\_x":"1","rot\_y":"1","rot\_z":"1","token\_id":"10","price":100,"resource\_id":"99","wallet":"0xfollowWallet","address":"0xnftAddress"}]
{% endtab %}
{% endtabs %}

## updateSlot

<mark style="color:green;">`POST`</mark> `https://business.dglive.org/api/updateSlot/Slot ID/API KEY`

Updates the specified slot with the specified parameters.

#### Query Parameters

| Name                                      | Type    | Description                      |
| ----------------------------------------- | ------- | -------------------------------- |
| Slot ID<mark style="color:red;">\*</mark> | Int     | The ID of the slot to be updated |
| API KEY<mark style="color:red;">\*</mark> | Varchar | A valid API KEY                  |

#### Request Body

| Name         | Type    | Description                           |
| ------------ | ------- | ------------------------------------- |
| address      | Varchar | The token address                     |
| resource\_id | Varchar | The resource ID                       |
| token\_id    | Varchar | The Token ID                          |
| wallet       | Varchar | The follow wallet address             |
| name         | Varchar | The name of the slot you are updating |
| pos\_x       | Int     | The x position for this slot          |
| pos\_y       | Int     | The y position for this slot          |
| pos\_z       | Int     | The z position for this slot          |
| rot\_x       | Int     | The x rotation for this slot          |
| rot\_y       | Int     | The y rotation for this slot          |
| rot\_z       | Int     | The z rotation for this slot          |
| size\_x      | Int     | The y size for this slot              |
| size\_y      | Int     | The y size for this slot              |
| size\_z      | Int     | The z size for this slot              |
| price        | Double  | The price for this slot               |

{% tabs %}
{% tab title="200: OK " %}
{}
{% endtab %}
{% endtabs %}

## deleteSlot

<mark style="color:blue;">`GET`</mark> `https://business.dglive.org/api/deleteSlot/Slot ID`

Deletes the specified slot (This only works if you are logged into the DG Business platform, no api key access is allowed yet).<br>

#### Query Parameters

| Name                                      | Type | Description                  |
| ----------------------------------------- | ---- | ---------------------------- |
| Slot ID<mark style="color:red;">\*</mark> | Int  | The ID of the slot to delete |

{% tabs %}
{% tab title="200: OK " %}
{}
{% endtab %}
{% endtabs %}
