{
  "service": "partner_stack_partner",
  "displayName": "PartnerStack Partner",
  "categories": [
    "Marketing",
    "Finance"
  ],
  "authTypes": [
    "api_key"
  ],
  "auth": [
    {
      "type": "api_key",
      "label": "API Key",
      "placeholder": "PARTNERSTACK_PARTNER_API_KEY",
      "description": "PartnerStack Partner API key sent with the Authorization Bearer header. Find it in the Partner dashboard under Settings -> API: https://docs.partnerstack.com/reference/partner-api-authentication.",
      "extraFields": []
    }
  ],
  "homepageUrl": "https://partnerstack.com",
  "actions": [
    {
      "id": "partner_stack_partner.get_marketplace_program",
      "service": "partner_stack_partner",
      "name": "get_marketplace_program",
      "description": "Retrieve one marketplace program by company key through the PartnerStack Partner API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_key": {
            "type": "string",
            "minLength": 1,
            "description": "The PartnerStack company key of the marketplace program."
          }
        },
        "additionalProperties": false,
        "description": "The marketplace program lookup input."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "program": {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "description": "The numeric PartnerStack program identifier."
              },
              "key": {
                "type": "string",
                "description": "The PartnerStack company or program key."
              },
              "name": {
                "type": "string",
                "description": "The marketplace program name."
              },
              "website": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The marketplace program website URL."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "category": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "description": "One marketplace category."
                    },
                    "description": "The marketplace categories assigned to the program."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "country": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The origin country of the marketplace program."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The marketplace program description."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "integer",
                "description": "The program creation time as an epoch millisecond timestamp."
              },
              "has_sub_id": {
                "type": "boolean",
                "description": "Whether the program uses sub IDs."
              },
              "logo": {
                "anyOf": [
                  {
                    "type": "string",
                    "description": "The PartnerStack file key for the program logo."
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "raw": {
                "type": "object",
                "properties": {},
                "additionalProperties": true,
                "description": "The raw PartnerStack Partner API object."
              }
            },
            "additionalProperties": true,
            "required": [
              "key",
              "name",
              "raw"
            ],
            "description": "A PartnerStack marketplace program."
          },
          "message": {
            "type": "string",
            "description": "The PartnerStack response message."
          },
          "status": {
            "type": "integer",
            "description": "The PartnerStack response status code."
          }
        },
        "additionalProperties": false,
        "required": [
          "program"
        ],
        "description": "A PartnerStack marketplace program result."
      }
    },
    {
      "id": "partner_stack_partner.list_marketplace_programs",
      "service": "partner_stack_partner",
      "name": "list_marketplace_programs",
      "description": "List active marketplace programs available through the PartnerStack Partner API.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "min_created": {
            "type": "integer",
            "description": "Only return programs created at or after this epoch millisecond timestamp."
          },
          "max_created": {
            "type": "integer",
            "description": "Only return programs created at or before this epoch millisecond timestamp."
          },
          "category": {
            "type": "string",
            "minLength": 1,
            "description": "Only return programs in this marketplace category."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250,
            "description": "The number of items to request. PartnerStack allows 1 to 250."
          },
          "starting_after": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the following page of list results."
          },
          "ending_before": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the previous page of list results."
          }
        },
        "additionalProperties": false,
        "description": "Filters and pagination controls for listing PartnerStack marketplace programs."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "programs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "integer",
                  "description": "The numeric PartnerStack program identifier."
                },
                "key": {
                  "type": "string",
                  "description": "The PartnerStack company or program key."
                },
                "name": {
                  "type": "string",
                  "description": "The marketplace program name."
                },
                "website": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The marketplace program website URL."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "category": {
                  "anyOf": [
                    {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "description": "One marketplace category."
                      },
                      "description": "The marketplace categories assigned to the program."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "country": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The origin country of the marketplace program."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The marketplace program description."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "integer",
                  "description": "The program creation time as an epoch millisecond timestamp."
                },
                "has_sub_id": {
                  "type": "boolean",
                  "description": "Whether the program uses sub IDs."
                },
                "logo": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The PartnerStack file key for the program logo."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw PartnerStack Partner API object."
                }
              },
              "additionalProperties": true,
              "required": [
                "key",
                "name",
                "raw"
              ],
              "description": "A PartnerStack marketplace program."
            },
            "description": "The marketplace programs returned for this page."
          },
          "page": {
            "type": "object",
            "properties": {
              "has_more": {
                "type": "boolean",
                "description": "Whether more items are available after this result page."
              }
            },
            "additionalProperties": false,
            "description": "PartnerStack cursor pagination metadata."
          },
          "message": {
            "type": "string",
            "description": "The PartnerStack response message."
          },
          "status": {
            "type": "integer",
            "description": "The PartnerStack response status code."
          }
        },
        "additionalProperties": false,
        "required": [
          "programs",
          "page"
        ],
        "description": "A paginated PartnerStack marketplace program list."
      }
    },
    {
      "id": "partner_stack_partner.list_partnerships",
      "service": "partner_stack_partner",
      "name": "list_partnerships",
      "description": "List partnerships managed by or owned by the connected PartnerStack partner account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_by": {
            "type": "string",
            "enum": [
              "-created_at",
              "created_at",
              "-updated_at",
              "updated_at"
            ],
            "description": "The partnership ordering expression."
          },
          "has_sub_id": {
            "type": "string",
            "enum": [
              "true",
              "false",
              "null"
            ],
            "description": "Whether the program uses sub IDs."
          },
          "include_offers": {
            "type": "boolean",
            "description": "Whether to include offers in each partnership response."
          },
          "include_archived": {
            "type": "boolean",
            "description": "Whether to include archived partnerships."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250,
            "description": "The number of items to request. PartnerStack allows 1 to 250."
          },
          "starting_after": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the following page of list results."
          },
          "ending_before": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the previous page of list results."
          }
        },
        "additionalProperties": false,
        "description": "Filters and pagination controls for listing PartnerStack partnerships."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "partnerships": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The PartnerStack partnership key."
                },
                "created_at": {
                  "type": "integer",
                  "description": "The partnership creation time as an epoch millisecond timestamp."
                },
                "updated_at": {
                  "type": "integer",
                  "description": "The partnership update time as an epoch millisecond timestamp."
                },
                "claimed": {
                  "type": "boolean",
                  "description": "Whether the partnership has been claimed."
                },
                "company": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "integer",
                      "description": "The numeric PartnerStack company identifier."
                    },
                    "key": {
                      "type": "string",
                      "description": "The PartnerStack company key."
                    },
                    "name": {
                      "type": "string",
                      "description": "The company name."
                    }
                  },
                  "additionalProperties": true,
                  "description": "A PartnerStack company summary."
                },
                "has_sub_id": {
                  "anyOf": [
                    {
                      "type": "boolean",
                      "description": "Whether the program uses sub IDs."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw PartnerStack Partner API object."
                }
              },
              "additionalProperties": true,
              "required": [
                "key",
                "raw"
              ],
              "description": "A PartnerStack partnership."
            },
            "description": "The partnerships returned for this page."
          },
          "page": {
            "type": "object",
            "properties": {
              "has_more": {
                "type": "boolean",
                "description": "Whether more items are available after this result page."
              }
            },
            "additionalProperties": false,
            "description": "PartnerStack cursor pagination metadata."
          },
          "message": {
            "type": "string",
            "description": "The PartnerStack response message."
          },
          "status": {
            "type": "integer",
            "description": "The PartnerStack response status code."
          }
        },
        "additionalProperties": false,
        "required": [
          "partnerships",
          "page"
        ],
        "description": "A paginated PartnerStack partnership list."
      }
    },
    {
      "id": "partner_stack_partner.list_payouts",
      "service": "partner_stack_partner",
      "name": "list_payouts",
      "description": "List payouts for the connected PartnerStack partner account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "min_created": {
            "type": "integer",
            "description": "Only return payouts created at or after this epoch millisecond timestamp."
          },
          "max_created": {
            "type": "integer",
            "description": "Only return payouts created at or before this epoch millisecond timestamp."
          },
          "order_by": {
            "type": "string",
            "enum": [
              "-created_at",
              "created_at"
            ],
            "description": "The payout ordering expression."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250,
            "description": "The number of items to request. PartnerStack allows 1 to 250."
          },
          "starting_after": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the following page of list results."
          },
          "ending_before": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the previous page of list results."
          }
        },
        "additionalProperties": false,
        "description": "Filters and pagination controls for listing PartnerStack payouts."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "payouts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The PartnerStack payout key."
                },
                "created_at": {
                  "type": "integer",
                  "description": "The payout creation time as an epoch millisecond timestamp."
                },
                "updated_at": {
                  "type": "integer",
                  "description": "The payout update time as an epoch millisecond timestamp."
                },
                "amount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The payout amount in cents."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "amount_usd": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The payout amount converted to USD cents."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The payout currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The payout lifecycle status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "provider": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "description": "The PartnerStack payment provider key."
                    },
                    "external_key": {
                      "type": "string",
                      "description": "The external key assigned by the payment provider."
                    },
                    "meta": {
                      "type": "object",
                      "properties": {},
                      "additionalProperties": true,
                      "description": "The raw PartnerStack Partner API object."
                    }
                  },
                  "additionalProperties": true,
                  "description": "The PartnerStack payout payment provider details."
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw PartnerStack Partner API object."
                }
              },
              "additionalProperties": true,
              "required": [
                "key",
                "raw"
              ],
              "description": "A PartnerStack payout."
            },
            "description": "The payouts returned for this page."
          },
          "page": {
            "type": "object",
            "properties": {
              "has_more": {
                "type": "boolean",
                "description": "Whether more items are available after this result page."
              }
            },
            "additionalProperties": false,
            "description": "PartnerStack cursor pagination metadata."
          },
          "message": {
            "type": "string",
            "description": "The PartnerStack response message."
          },
          "status": {
            "type": "integer",
            "description": "The PartnerStack response status code."
          }
        },
        "additionalProperties": false,
        "required": [
          "payouts",
          "page"
        ],
        "description": "A paginated PartnerStack payout list."
      }
    },
    {
      "id": "partner_stack_partner.list_rewards",
      "service": "partner_stack_partner",
      "name": "list_rewards",
      "description": "List rewards for the connected PartnerStack partner account.",
      "requiredScopes": [],
      "providerPermissions": [],
      "inputSchema": {
        "type": "object",
        "properties": {
          "company_key": {
            "type": "string",
            "minLength": 1,
            "description": "Only return rewards for this PartnerStack company key."
          },
          "payment_status": {
            "type": "string",
            "enum": [
              "in_transit",
              "withdrawn",
              "available",
              "paid_externally",
              "expired",
              "failed",
              "merging"
            ],
            "description": "The reward payment status."
          },
          "max_created": {
            "type": "integer",
            "description": "Only return rewards created at or before this epoch millisecond timestamp."
          },
          "min_created": {
            "type": "integer",
            "description": "Only return rewards created at or after this epoch millisecond timestamp."
          },
          "order_by": {
            "type": "string",
            "enum": [
              "-created_at",
              "created_at",
              "-amount",
              "amount",
              "-ready_at",
              "ready_at"
            ],
            "description": "The reward ordering expression."
          },
          "group_key": {
            "type": "string",
            "minLength": 1,
            "description": "Only return rewards for this PartnerStack group key."
          },
          "customer_key": {
            "type": "string",
            "minLength": 1,
            "description": "Only return rewards for this PartnerStack customer key."
          },
          "invoice_key": {
            "type": "string",
            "minLength": 1,
            "description": "Only return rewards for this PartnerStack invoice key."
          },
          "status": {
            "type": "string",
            "minLength": 1,
            "description": "Only return rewards with this reward status."
          },
          "exclude_drip_rewards": {
            "type": "string",
            "enum": [
              "true",
              "false"
            ],
            "description": "Whether drip rewards should be excluded."
          },
          "hide_archived_rewards": {
            "type": "boolean",
            "description": "Whether archived rewards should be hidden."
          },
          "empty_line_id": {
            "type": "boolean",
            "description": "Whether returned drip rewards must have an empty line ID."
          },
          "keywords": {
            "type": "string",
            "minLength": 1,
            "description": "Free-text keywords used by PartnerStack to filter rewards."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "Only return rewards whose description contains this text."
          },
          "distinct_description": {
            "type": "boolean",
            "description": "Whether reward descriptions should be distinct."
          },
          "distinct_decline_reason": {
            "type": "boolean",
            "description": "Whether reward decline reasons should be distinct."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 250,
            "description": "The number of items to request. PartnerStack allows 1 to 250."
          },
          "starting_after": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the following page of list results."
          },
          "ending_before": {
            "type": "string",
            "minLength": 1,
            "description": "A cursor item key used to return the previous page of list results."
          }
        },
        "additionalProperties": false,
        "description": "Filters and pagination controls for listing PartnerStack rewards."
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "rewards": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "The PartnerStack reward key."
                },
                "created_at": {
                  "type": "integer",
                  "description": "The reward creation time as an epoch millisecond timestamp."
                },
                "updated_at": {
                  "type": "integer",
                  "description": "The reward update time as an epoch millisecond timestamp."
                },
                "amount": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The reward amount in cents when returned by PartnerStack."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "amount_usd": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "description": "The reward amount converted to USD cents."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "currency": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The reward currency code."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The reward lifecycle status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "payment_status": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The reward payment status."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "The reward description."
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "raw": {
                  "type": "object",
                  "properties": {},
                  "additionalProperties": true,
                  "description": "The raw PartnerStack Partner API object."
                }
              },
              "additionalProperties": true,
              "required": [
                "key",
                "raw"
              ],
              "description": "A PartnerStack reward."
            },
            "description": "The rewards returned for this page."
          },
          "page": {
            "type": "object",
            "properties": {
              "has_more": {
                "type": "boolean",
                "description": "Whether more items are available after this result page."
              }
            },
            "additionalProperties": false,
            "description": "PartnerStack cursor pagination metadata."
          },
          "message": {
            "type": "string",
            "description": "The PartnerStack response message."
          },
          "status": {
            "type": "integer",
            "description": "The PartnerStack response status code."
          }
        },
        "additionalProperties": false,
        "required": [
          "rewards",
          "page"
        ],
        "description": "A paginated PartnerStack reward list."
      }
    }
  ]
}
