Addition of field "description" like AppUsageRecord(Admin Apis) in AppUsageSale(Partner Apis)

Emilio_076
Shopify Partner
1 0 2

Hi there,

I want to make a GraphQL query that implements the field "description" of AppUsageRecord(Admin Apis) with the object AppUsageSale(Parter Apis) that doesn't have that field. So do you know if there already is a field like that in the billing section of Partner Apis that I can Use?

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1322 216 456

Hey @Emilio_076 . There's not a direct equivalent for the AppUsageRecord description field within the Partner API at the moment, but you could potentially combine the data from both the Admin and Partner APIs to retrieve the information in the formatting that works best for you in your own database/logging system. This isn't going to give you the exact same info you can get from the description field via the admin API, but it could help combine transaction records, etc.  Here's a potential high-level workaround you could use though:

 

1. Query the AppUsageRecord description field value from the Admin API and the Transaction/App ID values that you can surface from the Partner API (you can use the Transaction Connection to grab more details if needed).

2. Store the descriptions created for each AppUsageRecord in your own database, and associate them with unique identifiers from the Partner API (e.g., the Transaction or App ID).

3. When you need to fetch these descriptions along with the query results from the Partner API, you can look up the corresponding descriptions from your database based on the unique identifiers provided by the Partner API, like the 'Transaction' or 'App' IDs.

We can't help with code-level support at the moment, but this could be something you may be able to integrate into a MongoDB instance, if you're using Javascript or Ruby, for example. 

Hope this helps - thanks for getting in touch.

Al | Shopify Developer Support
 

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

Andrew_Cargill
Shopify Partner
61 2 15

+1 for been able to access the usage sale description via the Partner API. In the docs there is https://shopify.dev/docs/api/partner/2024-01/objects/AppUsageRecord where I believe the name would be the value we need, but it doesn't seem accessible. 

Founder - Zapiet - Store Pickup + Delivery (apps.shopify.com/click-and-collect)
ShopifyDevSup
Shopify Staff
1322 216 456

Thanks for the feedback @Emilio_076 and @Andrew_Cargill ! I've passed this feedback on to our products teams as this would be useful to include in the Partner API. The Name in the usage record would be the name of the application charge, not the description of the usage charge. 

Thank again, 

 

- Kyle G.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog