Get/Update Evidence to Shopify Dispute via API

I’m trying to update a dispute evidence submission using Python, but I keep getting a 404 “Not Found” error. Here’s what I’ve done so far:

  1. Created a Shopify account
  2. Set up a development store
  3. Created a custom app with the necessary access scope permissions
  4. Copied the access token and API keys from the app settings
  5. Opened a dispute for a purchase on the development store
  6. Tried using the Python requests module to interact with the API

I also tried using the curl command from the documentation but got the same error.

Here is the curl command I’m using:

curl -X GET "https://${shop_url}/admin/api/2024-10/shopify_payments/disputes/${disputeId}/dispute_evidences.json" \
-H "X-Shopify-Access-Token: ${access_token}" \
-H "Content-Type: application/json"

This returns the following error:

{ “errors”: “Not Found” }

I have verified the values for ${shop_url} and ${disputeId}, and I am confident they are correct. I’ve also checked the Shopify API version (2024-10) and ensured the access token has the right permissions.

Has anyone encountered a similar issue or can provide guidance on what could be wrong? Any help would be greatly appreciated!

You’ll probably want to use GraphQL instead. The REST API was deprecated in October of this year. Just get the ID and use mutation to update.

I have enabled all the scopes in my testing dev app. Still I am getting this error:

{
  "errors": [
    {
      "message": "Access denied for disputeEvidenceUpdate field. Required access: `write_shopify_payments_dispute_evidences` access scope. Also: The user must have `manage_orders_information` permission.",
      "locations": [
        {
          "line": 3,
          "column": 3
        }
      ],
      "path": [
        "disputeEvidenceUpdate"
      ],
      "extensions": {
        "code": "ACCESS_DENIED",
        "documentation": "https://shopify.dev/api/usage/access-scopes",
        "requiredAccess": "`write_shopify_payments_dispute_evidences` access scope. Also: The user must have `manage_orders_information` permission."
      }
    }
  ],
  "data": {
    "disputeEvidenceUpdate": null
  },
  "extensions": {
    "cost": {
      "requestedQueryCost": 12,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 2000.0,
        "currentlyAvailable": 1990,
        "restoreRate": 100.0
      }
    }
  }
}

@Bug-Master any update?