ajayvyas
09-25-2020
03:06 AM
Thread Options
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
CatalogItem not visible under sandbox or seller dashboard
We are trying to integrate Square API with our e-commerce system. While testing the APIs we found that CatalogItems we are adding using APIs are not displaying under Sandbox or Production Dashboard.
Tried with API explorer also, here is the code:
Request :
var itemData = new CatalogItem.Builder()
.Name("Dummy Item 1")
.Description("This is the description for Item 1")
.Abbreviation("dum1")
.ProductType("REGULAR")
.Build();
var object = new CatalogObject.Builder(type: "ITEM", id: "#Test-CatalogItem-1")
.IsDeleted(false)
.PresentAtAllLocations(true)
.ItemData(itemData)
.Build();
var body = new UpsertCatalogObjectRequest.Builder(idempotencyKey: "2a30c16d-4aff-4e67-9137-86935af73f9c", object: object)
.Build();
try
{
var result = await client.CatalogApi.UpsertCatalogObjectAsync(body: body);
}
catch (ApiException e)
{
Console.WriteLine("Failed to make the request");
Console.WriteLine($"Response Code: {e.ResponseCode}");
Console.WriteLine($"Exception: {e.Message}");
}
Response :
cache-control: max-age=0, private, must-revalidate
content-encoding: gzip
content-type: application/json
date: Fri, 25 Sep 2020 10:04:34 GMT
square-version: 2020-09-23
{
"catalog_object": {
"type": "ITEM",
"id": "5RLSPXTTL2F4SHT2FRKZAAI5",
"updated_at": "2020-09-25T10:04:34.097Z",
"version": 1601028274097,
"is_deleted": false,
"present_at_all_locations": true,
"item_data": {
"name": "Dummy Item 1",
"description": "This is the description for Item 1",
"abbreviation": "dum1",
"product_type": "REGULAR"
}
},
"id_mappings": [
{
"client_object_id": "#Test-CatalogItem-1",
"object_id": "5RLSPXTTL2F4SHT2FRKZAAI5"
}
]
}
Reply
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report
1 REPLY 1
Valentina
09-29-2020
03:21 PM
Thread Options
- Subscribe to RSS Feed
- Mark Thread as New
- Mark Thread as Read
- Float this Thread for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
Hi @ajayvyas 👋
I ran this by our API team - they let me know that because you are not adding an item variation, that is why it's not showing on the Dashboard. I outlined the best ways to get help with API questions like this here in this thread, if you still need a hand!
Valentina
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
Community Moderator, Square
Sign in and click Mark as Best Answer if my reply answers your question.
Reply
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report