S_createAuction
Create auction for a specific product and start selling it.
Only plain text keys are supported by this mutation.
Supported arguments
The following arguments are supported by S_createAuction mutation:
Field | Type | Description |
---|---|---|
input | S_API_CreateAuctionInput! | Auction creation data |
Return type
The mutation returns theS_API_CreateAuctionResponse
type.
Example usage
There are a few scenarios how auction might be created, here we will list the most popular ones.
Plain auction
This approach should be taken if you are selling keys for already released game, you have keys on your side, and you're willing to upload those to Eneba.
Mutation
In the following mutation we are creating an auction for a product we've found by the
S_products
query.
mutation {
S_createAuction(
input: {
productId: "92c73bdc-80d4-1041-a4de-c12cc3d288c0"
enabled: true
keys: ["key-one", "key-two"]
autoRenew: false
price: { amount: 1399, currency: "EUR" }
}
) {
success
actionId
auctionId
price { amount currency }
}
}
Mutation
In the following mutation we are creating an auction for a product we've found by the
S_products
query and setting price with "priceIWantToGet" parameter.
mutation {
S_createAuction(
input: {
productId: "92c73bdc-80d4-1041-a4de-c12cc3d288c0"
enabled: true
keys: ["key-one", "key-two"]
autoRenew: false
priceIWantToGet: { amount: 1399, currency: "EUR" }
}
) {
success
actionId
auctionId
price { amount currency }
}
}
Pre-order auction
This approach should be taken if you want to sell keys for the upcoming game, which is not released yet.
Mutation
In the following mutation we are creating an auction for a product we've found by the
S_products
query.
You can find more information on
how to get pre-order products FAQ page.
mutation {
S_createAuction(
input: {
productId: "92c73bdc-80d4-1041-a4de-c12cc3d288c0"
enabled: true
onHand: 50
autoRenew: false
price: { amount: 1399, currency: "EUR" }
}
) {
success
actionId
auctionId
price { amount currency }
}
}
"Declared Stock" auction
To create "Declared Stock" auction you must enable "Declared Stock" for merchant first. You can find more information on the "Declared Stock" feature on automating your stock guide.
This approach should be taken if you want to sell keys for already released game, and you cannot store keys on Eneba site.
Mutation
In the following mutation we are creating an auction for a product we've found by the
S_products
query.
mutation {
S_createAuction(
input: {
productId: "92c73bdc-80d4-1041-a4de-c12cc3d288c0"
enabled: true
declaredStock: 50
autoRenew: false
price: { amount: 1399, currency: "EUR" }
}
) {
success
actionId
auctionId
price { amount currency }
}
}
Result
Here we have got the response, it says that our action is created, and we can check its status by using
A_action
query.
{
"data": {
"S_createAuction": {
"success": true,
"actionId": "d30285ba-b129-11ea-9077-0242ac12000b",
"price": {
"amount": 1399,
"currency": "EUR"
}
}
}
}