---
updatedAt: 2025-12-05T17:26:29.000Z
agentTools:
  projectIndex: https://docs.cupid.travel/llms.txt
---

# Partner update

The API allows customers to update their partner's inventory through two different sources:

**CSV Source**: Upload and process a CSV file with hotel data. Requires file upload and header position parameters.

**Connector Source**: Pull data directly from a connector. No file upload or header parameters needed.

This API also provides the option to automatically run mapping for all active partners.

To experiment this API call, use the following sandbox API key:

88cd7ff1-e3af-4377-a5b0-38a4b483e92f



# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Cupid Hotel Mapping API",
    "version": "3.0"
  },
  "security": [
    {
      "apikeyAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.cupid.travel"
    }
  ],
  "paths": {
    "/api/partner-update": {
      "post": {
        "tags": [
          "Hotel Mapping"
        ],
        "summary": "Partner update",
        "description": "The API allows customers to update their partner's inventory through two different sources:\n\n**CSV Source**: Upload and process a CSV file with hotel data. Requires file upload and header position parameters.\n\n**Connector Source**: Pull data directly from a connector. No file upload or header parameters needed.\n\nThis API also provides the option to automatically run mapping for all active partners.\n\nTo experiment this API call, use the following sandbox API key:\n\n88cd7ff1-e3af-4377-a5b0-38a4b483e92f\n\n",
        "security": [
          {
            "apikeyAuth": []
          }
        ],
        "parameters": [
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "API key for authentication"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "partner_id": {
                    "type": "string",
                    "description": "The ID of the partner to update"
                  },
                  "source": {
                    "type": "string",
                    "enum": [
                      "csv",
                      "connector"
                    ],
                    "description": "Source of the inventory data. 'csv' for file upload, 'connector' for direct connector integration",
                    "example": "csv"
                  },
                  "header_id": {
                    "type": "string",
                    "description": "hotel code position in your csv (starting from position 0) (Required when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_name": {
                    "type": "string",
                    "description": "hotel name position in your csv (starting from position 0) (Required when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_address": {
                    "type": "string",
                    "description": "hotel address position in your csv (starting from position 0) (Required when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_city": {
                    "type": "string",
                    "description": "hotel city position in your csv (starting from position 0) (Optional when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_country_code": {
                    "type": "string",
                    "description": "hotel country position in your csv (starting from position 0) (Required when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_latitude": {
                    "type": "string",
                    "description": "hotel latitude position in your csv (starting from position 0) (Recommended when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_longitude": {
                    "type": "string",
                    "description": "hotel longitude position in your csv (starting from position 0) (Recommended when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_city_id": {
                    "type": "string",
                    "description": "hotel city id position in your csv (starting from position 0) (Optional when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_chain": {
                    "type": "string",
                    "description": "hotel chain position in your csv (starting from position 0) (Optional when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_type": {
                    "type": "string",
                    "description": "hotel type position in your csv (starting from position 0) (Optional when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_stars": {
                    "type": "string",
                    "description": "hotel stars position in your csv (starting from position 0) (Optional when source is 'csv', ignored when source is 'connector')"
                  },
                  "header_zip_code": {
                    "type": "string",
                    "description": "hotel postal code position in your csv (starting from position 0) (Optional when source is 'csv', ignored when source is 'connector')"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Partner CSV file (Required when source is 'csv', not needed when source is 'connector')"
                  },
                  "run_mapping": {
                    "type": "string",
                    "description": "boolean value (0 or 1) 1 : upload inventory and run mapping on all active mappings with same model",
                    "default": 0
                  },
                  "restrict_mapping_to_add_hotels": {
                    "type": "boolean",
                    "description": "boolean value (true or false) true :Run the mapping only on the newly added hotels from your inventory using the opportunities list from the previous mapping",
                    "default": false
                  },
                  "action": {
                    "type": "string",
                    "description": "string value (add or update) : Choose 'update' to replace the existing hotels or 'add' to keep the existing hotels and add your file on top of it",
                    "default": "update"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Ok",
            "headers": {
              "Date": {
                "schema": {
                  "type": "string",
                  "example": "Fri, 28 Jul 2023 08:46:27 GMT"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "example": "1614"
                }
              },
              "Connection": {
                "schema": {
                  "type": "string",
                  "example": "keep-alive"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response Code"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "Server": {
                "schema": {
                  "type": "string",
                  "example": "nginx/1.18.0 (Ubuntu)"
                }
              },
              "Date": {
                "schema": {
                  "type": "string",
                  "example": "Fri, 28 Jul 2023 08:46:27 GMT"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "example": "1614"
                }
              },
              "Connection": {
                "schema": {
                  "type": "string",
                  "example": "keep-alive"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "examples": {
                  "Wrong API key": {
                    "value": {
                      "error": {
                        "error": "Not authorized\""
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "Date": {
                "schema": {
                  "type": "string",
                  "example": "Fri, 28 Jul 2023 08:46:27 GMT"
                }
              },
              "Content-Type": {
                "schema": {
                  "type": "string",
                  "example": "application/json"
                }
              },
              "Content-Length": {
                "schema": {
                  "type": "integer",
                  "example": "1614"
                }
              },
              "Connection": {
                "schema": {
                  "type": "string",
                  "example": "keep-alive"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "description": "Response Code"
                    },
                    "msg": {
                      "type": "string",
                      "description": "The message",
                      "example": "Your Inventory is still being processed"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```