# Mercari

> Read Mercari Shops products, orders, transactions and inquiries; update products and stock, and message buyers. Requires a Japanese Mercari Shops API account.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/mercari

## Actions

### Get inquiry

Get inquiry from Mercari Shops.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "inquiry": {
      "firstOpenedAt": "example",
      "id": "example",
      "lastActivityAt": "example",
      "status": "example"
    }
  }
}
```

### Get order

Get order from Mercari Shops.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "order": {
      "createdAt": "example",
      "id": "example",
      "paidAt": "example",
      "status": "example",
      "totalPrice": 1,
      "updatedAt": "example"
    }
  }
}
```

### Get order transaction

Get order transaction from Mercari Shops.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "orderTransaction": {
      "createdAt": "example",
      "id": "example",
      "paidAt": "example",
      "status": "example",
      "totalPrice": 1,
      "updatedAt": "example"
    }
  }
}
```

### Get product

Get product from Mercari Shops.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "product": {
      "createdAt": "example",
      "description": "example",
      "id": "example",
      "name": "example",
      "price": 1,
      "status": "example",
      "updatedAt": "example",
      "variants": []
    }
  }
}
```

### Get shipping configuration

Get shipping configuration from Mercari Shops.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "productShippingConfiguration": {
      "createdAt": "example",
      "displayId": "example",
      "id": "example",
      "title": "example",
      "type": "example",
      "updatedAt": "example"
    }
  }
}
```

### Get shop

Get shop from Mercari Shops.

**Inputs**: None.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "shop": {
      "createdAt": "example",
      "description": "example",
      "id": "example",
      "name": "example",
      "shopStatus": "example"
    }
  }
}
```

### List inquiries

List inquiries from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "inquiries": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List inquiry messages

List inquiry messages from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.
- Inquiry ID (`inquiryId`, text, required): Inquiry ID.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "inquiryMessages": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List order cancellations

List order cancellations from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.
- Order transaction ID (`orderTransactionId`, text, required): Order transaction ID.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "orderCancellations": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List order shippings

List order shippings from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.
- Order transaction ID (`orderTransactionId`, text): Order transaction ID.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "orderShippings": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List order transactions

List order transactions from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.
- Ordered date gte (`orderedDateGte`, date and time): Ordered date gte.
- Ordered date lt (`orderedDateLt`, date and time): Ordered date lt.
- Updated date gte (`updatedDateGte`, date and time): Updated date gte.
- Updated date lt (`updatedDateLt`, date and time): Updated date lt.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "orderTransactions": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List orders

List orders from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.
- Keyword (`keyword`, text): Keyword.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "orders": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List product brands

List product brands from Mercari Shops.

**Inputs**: None.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "productBrands": []
  }
}
```

### List product categories

List product categories from Mercari Shops.

**Inputs**: None.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "productCategories": []
  }
}
```

### List products

List products from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.
- Keyword (`keyword`, text): Keyword.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "products": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List shipping configurations

List shipping configurations from Mercari Shops.

**Inputs**

- First (`first`, number): First. From 1 to 100.
- After (`after`, text): After.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "productShippingConfigurations": {
      "edges": [],
      "pageInfo": {
        "endCursor": "example",
        "hasNextPage": false
      }
    }
  }
}
```

### List states

List states from Mercari Shops.

**Inputs**: None.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "states": []
  }
}
```

### Send order message

Send a message to the buyer on an order transaction.

**Inputs**

- Order transaction ID (`order_transaction_id`, text, required): The order transaction ID from List order transactions.
- Message (`message`, text, required): The message to send to the buyer.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "addOrderTransactionMessage": {
      "orderTransaction": {
        "id": "example",
        "messages": []
      }
    }
  }
}
```

### Update product

Change a product’s name, description, price or visibility; other fields stay as they are.

**Inputs**

- Product (`product_id`, text, required): The product to update.
- Name (`name`, text): A new product name.
- Description (`description`, text): A new product description.
- Price (JPY) (`price`, number): The price in Japanese yen. From 300 to 9999999.
- Visibility (`status`, text): Choose Published to make the product public or Private to hide it. One of: `OPENED` (Published), `UNOPENED` (Private).

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "updateProduct": {
      "product": {
        "createdAt": "example",
        "description": "example",
        "id": "example",
        "name": "example",
        "price": 1,
        "status": "example",
        "updatedAt": "example",
        "variants": []
      }
    }
  }
}
```

### Update stock

Set a variant’s absolute stock quantity using its variant ID or shop SKU.

**Inputs**

- Variant ID (`variant_id`, text): The variant ID from Get product. Fill this or Shop SKU.
- Shop SKU (`sku_code`, text): Your unique shop SKU. Fill this or Variant ID.
- Stock quantity (`stock_quantity`, number, required): The new total quantity, rather than an amount to add. At least 0.

**Outputs**

- `data` (object): Mercari response data.

**Example output**

```json
{
  "data": {
    "updateProductVariant": {
      "productVariant": {
        "id": "example",
        "name": "example",
        "skuCode": "example",
        "stockQuantity": 1
      }
    }
  }
}
```
