{
  "openapi": "3.0.1",
  "info": {
    "title": "Developer Partner APIs",
    "description": "The Developer Partner Account APIs support partner onboarding by creating and managing onboarding invitations for developer partners. These APIs are used to initiate account setup by sending an onboarding invitation to a partner’s email address.\n\nAn invitation represents the starting point of the developer partner onboarding flow. It defines:\n\n- The partner email address to which the invitation is sent\n- The invitation validity period after which the request expires\n\nOnly one active invitation can exist for a given email address at a time. After the invitation expires, a new invitation can be created for the same email address.\n",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api-sandbox.sendpro360.pitneybowes.com/developerprofile",
      "description": "Sandbox Server"
    },
    {
      "url": "https://api.sendpro360.pitneybowes.com/developerprofile",
      "description": "Production Server (uses live data)"
    }
  ],
  "tags": [
    {
      "name": "Invitation",
      "description": "APIs for creating and managing developer partner onboarding invitations. These APIs support the initiation of the onboarding process by generating invitation requests tied to a partner email address and a defined validity period. They are used to control partner access to the onboarding flow and ensure that invitation requests remain unique per email address until expiry."
    }
  ],
  "paths": {
    "/api/v1/invitation": {
      "post": {
        "tags": [
          "Invitation"
        ],
        "summary": "Create Merchant onboarding Invitation",
        "description": "\"This operation creates the partner onboarding email invitation. These are the requirements to create this request:\n- **Email Address:** Email ID of the developer partner. Only one request can be generated per email address.\n- **Request Expiration Days:** User needs to specifies how long the onboarding invitation is valid. Once the invitation expires, a new invitation request can be generated on the same email address.\"\n",
        "operationId": "createPartnerInvitation",
        "requestBody": {
          "description": "This creates onboarding email invitation.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "The onboarding invitation has been created successfully.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Invitation already exists for this emailId.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "Error message explaining the issue."
          }
        },
        "required": [
          "message"
        ]
      },
      "CreateInvitationRequest": {
        "type": "object",
        "required": [
          "partnerEmailId",
          "expirationDays"
        ],
        "properties": {
          "partnerEmailId": {
            "type": "string",
            "description": "Developer partner email ID on which onboarding invitation will be sent.",
            "example": "NS05_merchant@yopmail.com"
          },
          "expirationDays": {
            "type": "number",
            "description": "Number of days after which the onboarding invitation expires.",
            "example": 10
          }
        }
      },
      "InvitationResponse": {
        "type": "object",
        "description": "Provides details about the onboarding email invitation, like the recipient's email address, invitation status,expiration period.",
        "properties": {
          "invitationId": {
            "type": "string",
            "description": "This is a Unique invitation ID against the developer who is inviting partner for onboarding.",
            "example": "xqlNEXQPL0mEod4"
          },
          "developerId": {
            "type": "string",
            "description": "This is Developer subscription ID.",
            "example": "sacd74e"
          },
          "email": {
            "type": "string",
            "description": "This is developer Partner email ID on which onboarding invitation has been sent.",
            "example": "NS05_merchant@yopmail.com"
          },
          "status": {
            "type": "string",
            "description": "This is current status of the onboarding invitation request.",
            "example": "Invited"
          },
          "invitationType": {
            "type": "string",
            "description": "This is the type of the invitation.",
            "example": "ONBOARD_REQUEST"
          },
          "createdBy": {
            "type": "string",
            "description": "This is the client ID of the developer who has created the invitation.",
            "example": "0oa20m6vx3wAZW7FQ0h8"
          },
          "provisioningRequestID": {
            "type": "string",
            "description": "This is provisioning request ID.",
            "example": null
          },
          "archived": {
            "type": "boolean",
            "description": "Whether the invitation is archived.",
            "example": false
          },
          "link": {
            "type": "string",
            "description": "This is the link to the onboarding invitation for the developer partner.",
            "example": "https://api-sandbox.sendpro360.pitneybowes.com/merchant-signup?invitationId4&invitationType=ONBOARD_REQUEST"
          },
          "insertTimestamp": {
            "type": "string",
            "description": "Timestamp information about when the invitation was created.",
            "example": "2024-09-15T12:40:24.256521003Z"
          },
          "updateTimestamp": {
            "type": "string",
            "description": "Timestamp information about when the invitation was last updated.",
            "example": "0001-01-01T00:00:00Z"
          },
          "expirationDate": {
            "type": "string",
            "description": "The date when the onboarding invitation expires. Once this date is reached, the invitation becomes invalid.",
            "example": "2024-09-25T12:40:24.254719091Z"
          }
        }
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}