{"openapi":"3.1.0","info":{"title":"Zoho Store Partner Acquisition API (demo)","version":"2.0.0-draft.1","description":"A headless API: it returns data and actions only and knows nothing about screens, so the Store client, MCP / AI agents and partner integrations all use the same operations. This demo runs on Cloudflare Workers and D1 with fictional data and no login. The MCP endpoint at /mcp exposes each operation as a tool with the same name as its operationId."},"servers":[{"url":"https://partner.kavi.work/api/v2"}],"tags":[{"name":"Partner codes"},{"name":"Signup links"},{"name":"Tag requests"},{"name":"Lookups"},{"name":"Demo"}],"paths":{"/partners/codes":{"get":{"operationId":"listPartnerCodes","summary":"List partner codes","description":"Returns the partner's code for the current data center, with the tagging page URL and the direct tagging link customers can use to tag their account to the partner. The list is empty when the partner has not created a code yet; create one with createPartnerCode.","tags":["Partner codes"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"listPartnerCodes","read_only":true,"destructive":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/PartnerCode"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}},"post":{"operationId":"createPartnerCode","summary":"Create the partner code","description":"Creates the partner code for the current data center. A partner has one code per data center, so this fails with partner_code_exists when one already exists; use updatePartnerCode to change it. Use validatePartnerCode first to check a candidate.","tags":["Partner codes"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.CREATE"]}],"x-mcp":{"tool":"createPartnerCode","read_only":false,"destructive":false},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value for this attempt. Repeating the request with the same value returns the first response.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The partner code: 6 to 15 characters, letters and digits only, stored in uppercase. It cannot contain zoho, test, reseller or partner, and must be unique.","minLength":6,"maxLength":15}},"required":["code"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/PartnerCode"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/codes/{id}":{"put":{"operationId":"updatePartnerCode","summary":"Change the partner code","description":"Replaces the partner code. The direct tagging link changes with it, so links shared earlier with the old code stop working. Get the id from listPartnerCodes.","tags":["Partner codes"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.UPDATE"]}],"x-mcp":{"tool":"updatePartnerCode","read_only":false,"destructive":false},"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the partner code.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The partner code: 6 to 15 characters, letters and digits only, stored in uppercase. It cannot contain zoho, test, reseller or partner, and must be unique.","minLength":6,"maxLength":15}},"required":["code"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/PartnerCode"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/codes/action/validate":{"post":{"operationId":"validatePartnerCode","summary":"Check a candidate partner code","description":"Checks a candidate code against every rule without saving it. Returns is_valid and the list of violations (too_short, too_long, invalid_characters, restricted_word, not_unique).","tags":["Partner codes"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"validatePartnerCode","read_only":true,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The partner code: 6 to 15 characters, letters and digits only, stored in uppercase. It cannot contain zoho, test, reseller or partner, and must be unique.","minLength":6,"maxLength":15}},"required":["code"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/PartnerCodeValidation"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/codes/fields":{"get":{"operationId":"getPartnerCodeFields","summary":"Field metadata of a partner code","description":"Returns the fields of a partner code with their labels, types and rules, so a client can build its form and an agent knows the rules without hardcoding them.","tags":["Partner codes"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"getPartnerCodeFields","read_only":true,"destructive":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/FieldMetadata"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/signup-links":{"get":{"operationId":"listSignupLinks","summary":"List signup links","description":"Returns one signup link per service. A customer who signs up through a link is tagged to the partner. Each item says whether a return URL and a CSS URL are configured and how many customers signed up through it. Filter by part of the service name with service_name_contains.","tags":["Signup links"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"listSignupLinks","read_only":true,"destructive":false},"parameters":[{"name":"language","in":"query","required":false,"description":"Language of the signup page the link opens.","schema":{"type":"string","enum":["en","fr","es"],"default":"en"}},{"name":"service_name[lk]","in":"query","required":false,"description":"Only services whose name contains this text (case-insensitive).","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","required":false,"description":"Items per page, 1 to 100.","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/SignupLink"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/signup-links/{id}":{"get":{"operationId":"getSignupLink","summary":"Get a signup link","description":"Returns one signup link with its return URL, CSS URL and signup count.","tags":["Signup links"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"getSignupLink","read_only":true,"destructive":false},"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the signup link.","schema":{"type":"string"}},{"name":"language","in":"query","required":false,"description":"Language of the signup page the link opens.","schema":{"type":"string","enum":["en","fr","es"],"default":"en"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/SignupLink"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}},"put":{"operationId":"updateSignupLink","summary":"Set the return URL and CSS URL of a signup link","description":"Sets where the customer lands after signing up (return_url) and the stylesheet applied to the signup page (css_url). Send only the field to change; an empty string clears it. Both must be https URLs.","tags":["Signup links"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.UPDATE"]}],"x-mcp":{"tool":"updateSignupLink","read_only":false,"destructive":false},"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the signup link.","schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"return_url":{"type":"string","description":"https URL the customer is sent to after signing up. Empty string clears it."},"css_url":{"type":"string","description":"https URL of a stylesheet for the signup page. Empty string clears it."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/SignupLink"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/signup-links/fields":{"get":{"operationId":"getSignupLinkFields","summary":"Field metadata of a signup link","description":"Returns the fields of a signup link with their labels, types and rules.","tags":["Signup links"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"getSignupLinkFields","read_only":true,"destructive":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/FieldMetadata"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/tag-requests":{"get":{"operationId":"listTagRequests","summary":"List tag requests","description":"Returns the requests the partner sent to existing customers asking them to tag the partner, newest first. The customer approves or rejects from their own account. Filter by status or by part of the customer email.","tags":["Tag requests"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"listTagRequests","read_only":true,"destructive":false},"parameters":[{"name":"status","in":"query","required":false,"description":"Only requests in this status.","schema":{"type":"string","enum":["pending","approved","rejected","cancelled"]}},{"name":"customer_email[lk]","in":"query","required":false,"description":"Only requests whose customer email contains this text.","schema":{"type":"string"}},{"name":"page","in":"query","required":false,"description":"Page number, starting at 1.","schema":{"type":"integer","default":1}},{"name":"per_page","in":"query","required":false,"description":"Items per page, 1 to 100.","schema":{"type":"integer","default":20}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TagRequest"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}},"post":{"operationId":"createTagRequests","summary":"Ask a customer to tag the partner","description":"Sends a tag request to a customer for one or more of their services; the customer gets an email and approves from their own account. Creates one request per service and returns them. Every service ID must be in available_services of checkTagAvailability, otherwise nothing is created and service_not_available lists the reason per service.","tags":["Tag requests"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.CREATE"]}],"x-mcp":{"tool":"createTagRequests","read_only":false,"destructive":false},"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value for this attempt. Repeating the request with the same value returns the first response.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_email":{"type":"string","description":"The customer's email address.","format":"email"},"service_ids":{"type":"array","items":{"type":"string"},"minItems":1,"description":"IDs of the services to request, taken from available_services of checkTagAvailability."}},"required":["customer_email","service_ids"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/TagRequest"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/tag-requests/{id}":{"get":{"operationId":"getTagRequest","summary":"Get a tag request","description":"Returns one tag request with its current status and the actions allowed on it.","tags":["Tag requests"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"getTagRequest","read_only":true,"destructive":false},"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the tag request.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/TagRequest"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/tag-requests/action/check-availability":{"post":{"operationId":"checkTagAvailability","summary":"Check which services of a customer can be requested","description":"Looks up a customer by email and returns the services the partner can ask to be tagged on (available_services) and the customer's other services with the reason they cannot be requested (other_services). Call this before createTagRequests to get the service IDs. is_customer_found is false when no customer has this email.","tags":["Tag requests"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"checkTagAvailability","read_only":true,"destructive":false},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"customer_email":{"type":"string","description":"The customer's email address.","format":"email"}},"required":["customer_email"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/TagAvailability"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/tag-requests/{id}/action/cancel":{"post":{"operationId":"cancelTagRequest","summary":"Cancel a pending tag request","description":"Withdraws a tag request the customer has not answered yet. Only a pending request can be cancelled; check actions.cancel.is_allowed on the request first.","tags":["Tag requests"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.UPDATE"]}],"x-mcp":{"tool":"cancelTagRequest","read_only":false,"destructive":true},"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the tag request.","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/TagRequest"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/partners/tag-requests/fields":{"get":{"operationId":"getTagRequestFields","summary":"Field metadata of a tag request","description":"Returns the fields of a tag request with their labels, types, rules and status options.","tags":["Tag requests"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"getTagRequestFields","read_only":true,"destructive":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/FieldMetadata"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/lookups/services":{"get":{"operationId":"listServices","summary":"List services","description":"Returns the Zoho services (id and name) used by signup links and tag requests.","tags":["Lookups"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"listServices","read_only":true,"destructive":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/lookups/languages":{"get":{"operationId":"listLanguages","summary":"List signup page languages","description":"Returns the languages a signup link can open in.","tags":["Lookups"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.READ"]}],"x-mcp":{"tool":"listLanguages","read_only":true,"destructive":false},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookup"}},"meta":{"$ref":"#/components/schemas/Meta"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/demo/action/reset":{"post":{"operationId":"resetDemoData","summary":"Restore the demo data","description":"Demo only. Deletes every change and restores the original sample data. Set with_partner_code to false to start with no partner code, so the create flow can be shown.","tags":["Demo"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.UPDATE"]}],"x-mcp":{"tool":"resetDemoData","read_only":false,"destructive":true},"x-demo-only":true,"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"with_partner_code":{"type":"boolean","description":"false starts the demo with no partner code.","default":true}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/DemoReset"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}},"/demo/tag-requests/{id}/action/resolve":{"post":{"operationId":"resolveDemoTagRequest","summary":"Answer a tag request as the customer","description":"Demo only. Plays the customer: approves or rejects a pending tag request, so the whole life cycle can be shown. In the real system the customer does this from their own account.","tags":["Demo"],"security":[{"ZohoAuth":["ZohoStore.partneracquisition.UPDATE"]}],"x-mcp":{"tool":"resolveDemoTagRequest","read_only":false,"destructive":false},"x-demo-only":true,"parameters":[{"name":"id","in":"path","required":true,"description":"ID of the tag request.","schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"A unique value for this attempt. Repeating the request with the same value returns the first response.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","description":"The customer's answer.","enum":["approved","rejected"]}},"required":["decision"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"result":{"type":"string","enum":["success"]},"data":{"$ref":"#/components/schemas/TagRequest"}}}}}},"400":{"description":"The request is not valid. data.details names each field.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"401":{"description":"Authentication is missing or not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"404":{"description":"The item does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"409":{"description":"The action conflicts with the current state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}},"429":{"description":"Too many requests. Retry after the time in Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Failure"}}}}}}}},"components":{"schemas":{"PartnerCode":{"type":"object","properties":{"id":{"type":"string","description":"ID of the partner code.","example":"1001"},"code":{"type":"string","description":"The code customers enter to tag the partner.","example":"RAMANIDC"},"dc":{"type":"string","description":"Data center the code works in.","example":"us"},"tagging_page_url":{"type":"string","description":"Page where a customer enters the code."},"direct_tagging_url":{"type":"string","description":"Link that opens the tagging page with the code filled in."},"created_time":{"type":"integer","description":"When the code was created. Unix timestamp in seconds.","example":1764662400},"modified_time":{"type":"integer","description":"When the code was last changed. Unix timestamp in seconds.","example":1764662400},"actions":{"type":"object","description":"Actions allowed on this item.","properties":{"update":{"type":"object","description":"One action on the item.","properties":{"is_allowed":{"type":"boolean","description":"Whether the caller can run the action now."},"disabled_reason":{"type":"string","description":"Why not, when is_allowed is false."}}}}}}},"PartnerCodeValidation":{"type":"object","properties":{"code":{"type":"string","description":"The candidate in uppercase."},"is_valid":{"type":"boolean","description":"Whether the candidate passes every rule."},"violations":{"type":"array","description":"The rules the candidate breaks.","items":{"type":"object","properties":{"code":{"type":"string","description":"too_short, too_long, invalid_characters, restricted_word or not_unique."},"message":{"type":"string","description":"Message for the user."}}}}}},"SignupLink":{"type":"object","properties":{"id":{"type":"string","description":"ID of the signup link.","example":"2001"},"service_id":{"type":"string","description":"Service ID.","example":"2"},"service_name":{"type":"string","description":"Service name.","example":"CRM"},"language":{"type":"string","description":"Language of the signup page.","example":"en"},"signup_url":{"type":"string","description":"The link to share. Customers who sign up through it are tagged to the partner."},"return_url":{"type":"string","description":"Where the customer lands after signing up. Empty when not configured."},"css_url":{"type":"string","description":"Stylesheet applied to the signup page. Empty when not configured."},"is_return_url_configured":{"type":"boolean","description":"Whether a return URL is set."},"is_css_url_configured":{"type":"boolean","description":"Whether a CSS URL is set."},"signup_count":{"type":"integer","description":"Customers who signed up through this link.","example":128},"modified_time":{"type":"integer","description":"When the link was last changed. Unix timestamp in seconds.","example":1764662400},"actions":{"type":"object","description":"Actions allowed on this item.","properties":{"update":{"type":"object","description":"One action on the item.","properties":{"is_allowed":{"type":"boolean","description":"Whether the caller can run the action now."},"disabled_reason":{"type":"string","description":"Why not, when is_allowed is false."}}}}}}},"TagRequest":{"type":"object","properties":{"id":{"type":"string","description":"ID of the tag request.","example":"3001"},"service_id":{"type":"string","description":"Service ID.","example":"7"},"service_name":{"type":"string","description":"Service name.","example":"Projects"},"profile_id":{"type":"string","description":"Customer's profile ID.","example":"RT0000084721PP6"},"organization_name":{"type":"string","description":"Customer's organization.","example":"Novara Tech"},"plan_name":{"type":"string","description":"Plan of the service.","example":"Free plan"},"customer_email":{"type":"string","description":"Customer's email address.","example":"johndoe@demo2.zohotest.com"},"status":{"type":"string","description":"Current status.","enum":["pending","approved","rejected","cancelled"]},"requested_time":{"type":"integer","description":"When the request was sent. Unix timestamp in seconds.","example":1764662400},"status_time":{"type":"integer","description":"When the status last changed. Unix timestamp in seconds.","example":1764662400},"actions":{"type":"object","description":"Actions allowed on this item.","properties":{"cancel":{"type":"object","description":"One action on the item.","properties":{"is_allowed":{"type":"boolean","description":"Whether the caller can run the action now."},"disabled_reason":{"type":"string","description":"Why not, when is_allowed is false."}}}}}}},"TagAvailability":{"type":"object","properties":{"customer_email":{"type":"string","description":"The email that was looked up."},"is_customer_found":{"type":"boolean","description":"false when no customer has this email."},"available_services":{"type":"array","description":"Services that can be requested.","items":{"type":"object","properties":{"service_id":{"type":"string","description":"Service ID.","example":"7"},"service_name":{"type":"string","description":"Service name.","example":"Projects"},"profile_id":{"type":"string","description":"Customer's profile ID.","example":"RT0000084721PP6"},"organization_name":{"type":"string","description":"Customer's organization.","example":"Novara Tech"},"plan_name":{"type":"string","description":"Plan of the service.","example":"Free plan"}}}},"other_services":{"type":"array","description":"The customer's other services, which cannot be requested.","items":{"type":"object","properties":{"service_id":{"type":"string","description":"Service ID.","example":"7"},"service_name":{"type":"string","description":"Service name.","example":"Projects"},"profile_id":{"type":"string","description":"Customer's profile ID.","example":"RT0000084721PP6"},"organization_name":{"type":"string","description":"Customer's organization.","example":"Novara Tech"},"plan_name":{"type":"string","description":"Plan of the service.","example":"Free plan"},"unavailable_reason":{"type":"string","description":"Why the service cannot be requested."}}}}}},"FieldMetadata":{"type":"object","properties":{"resource":{"type":"string","description":"Resource the fields belong to."},"fields":{"type":"array","description":"One entry per field: name, label, type, is_required, is_read_only, and the rules of that type.","items":{"type":"object","additionalProperties":true}}}},"Lookup":{"type":"object","properties":{"id":{"type":"string","description":"ID."},"name":{"type":"string","description":"Display name."}}},"DemoReset":{"type":"object","properties":{"is_reset":{"type":"boolean","description":"Always true."},"with_partner_code":{"type":"boolean","description":"Whether the demo starts with a partner code."}}},"Meta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"has_more":{"type":"boolean","description":"true when a next page exists."},"total":{"type":"integer","description":"Items matching the filters."}}},"Failure":{"type":"object","properties":{"result":{"type":"string","enum":["failure"]},"data":{"type":"object","properties":{"code":{"type":"string","description":"Stable error code. Never reworded; safe to branch on.","example":"partner_code_invalid"},"message":{"type":"string","description":"Message for the user, in their language."},"details":{"type":"array","description":"One entry per field problem.","items":{"type":"object","properties":{"field":{"type":"string","description":"Request field."},"code":{"type":"string","description":"Stable problem code."},"message":{"type":"string","description":"Message for the user."}}}}}}}}},"securitySchemes":{"ZohoAuth":{"type":"oauth2","description":"Planned for the real API. The demo does not check it.","flows":{"authorizationCode":{"authorizationUrl":"https://accounts.zoho.com/oauth/v2/auth","tokenUrl":"https://accounts.zoho.com/oauth/v2/token","scopes":{"ZohoStore.partneracquisition.READ":"READ access to partner acquisition data","ZohoStore.partneracquisition.CREATE":"CREATE access to partner acquisition data","ZohoStore.partneracquisition.UPDATE":"UPDATE access to partner acquisition data"}}}}}}}