SDK reference · Python SDK
prov.authorize.issuer.agent_merchants.put
prov.authorize.issuer.agent_merchants.put in Python SDK. The issuer's list (scope="issuer") or one card's (scope="card").
Signature
prov.authorize.issuer.agent_merchants.put(**body: Any = …) -> AnyParameters
**bodyAny
Request fields
scopeenumRequiredissuer(every program) orcard. One ofissuer,card.program_idstring- The card's program (
cardscope only). card_tokenstring- The processor's card token (
cardscope only). A card number is refused. patternsarray of stringsRequired- Patterns over the merchant id or name.
inheritbooleancardscope only: false leaves out the issuer's and the program's lists. Default true.
Returns
Any The list, replaced (same id).
HTTP operation
PUT /v1/authorize/issuer_agent_merchants: Set suspected-agent merchants for the issuer or a card
Errors
- authentication_required
- card_number_refused
- insufficient_scope
- parameter_invalid
- plan_required
- rate_limit_exceeded
- resource_missing
Example
const step1 = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_programs`, {
method: "POST",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({ "name": "Fernhill agent cards", "processor": "lithic" }),
})).json();
const program = step1.id;
const data = await (await fetch(`${process.env.PROVENANCE_API}/v1/authorize/issuer_agent_merchants`, {
method: "PUT",
headers: { Authorization: "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x", "Content-Type": "application/json" },
body: JSON.stringify({
"scope": "card",
"program_id": program,
"card_token": "card_tok_fernhill_7",
"patterns": [
"ROBOSHOP*",
"174030075991"
]
}),
})).json();import os
import httpx
api = os.environ["PROVENANCE_API"]
step1 = httpx.post(f"{api}/v1/authorize/issuer_programs", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"name": "Fernhill agent cards",
"processor": "lithic"
}).json()
program = step1["id"]
data = httpx.put(f"{api}/v1/authorize/issuer_agent_merchants", headers={"Authorization": "Bearer prv_test_ent_E7nT2vQ9bW4mK8sYd3cFjLh6gAe1pR5x"}, json={
"scope": "card",
"program_id": program,
"card_token": "card_tok_fernhill_7",
"patterns": [
"ROBOSHOP*",
"174030075991"
]
}).json()