Hi,
I’m attempting to create a production variation as per: Pipedrive API Reference and Documentation.
However, I keep getting back and HTTP 405. Is there something I’m missing? Likewise, your Postman collection doesn’t contain an example request nor does your PHP client?!?
Unless I’m doing something wrong with composer require pipedrive/pipedrive
.
Below is a dump of my response:
Illuminate\Http\Client\Response^ {#1336 // app/Console/Commands/SyncPipedriveProductVariantsAndDeals.php:61
#response: GuzzleHttp\Psr7\Response^ {#1374
-reasonPhrase: "Method Not Allowed"
-statusCode: 405
-headers: array:23 [
"Date" => array:1 [
0 => "Fri, 21 Feb 2025 12:59:57 GMT"
]
"Content-Type" => array:1 [
0 => "text/html"
]
"Transfer-Encoding" => array:1 [
0 => "chunked"
]
"Connection" => array:1 [
0 => "keep-alive"
]
"CF-Ray" => array:1 [
0 => "9156eaa50d3a5432-TLL"
]
"CF-Cache-Status" => array:1 [
0 => "DYNAMIC"
]
"Cache-Control" => array:1 [
0 => "no-cache"
]
"Strict-Transport-Security" => array:1 [
0 => "max-age=31536000; includeSubDomains"
]
"Vary" => array:1 [
0 => "Sec-CH-Prefers-Color-Scheme"
]
"accept-ch" => array:1 [
0 => "Sec-CH-Prefers-Color-Scheme"
]
"access-control-expose-headers" => array:1 [
0 => "X-RateLimit-Remaining, X-RateLimit-Limit, X-RateLimit-Reset"
]
"badi" => array:1 [
0 => "Routing: lon-2=>lon-2; Version: 12a7; Host: 7db6d9f7c-8rdmt;"
]
"critical-ch" => array:1 [
0 => "Sec-CH-Prefers-Color-Scheme"
]
"x-content-type-options" => array:1 [
0 => "nosniff"
]
"x-correlation-id" => array:1 [
0 => "d7c9166e-da1a-44a7-a275-d9df36ee2eb2"
]
"x-daily-requests-left" => array:1 [
0 => "9992"
]
"x-ratelimit-limit" => array:1 [
0 => "80"
]
"x-ratelimit-remaining" => array:1 [
0 => "79"
]
"x-ratelimit-reset" => array:1 [
0 => "2"
]
"x-xss-protection" => array:1 [
0 => "1; mode=block"
]
"Set-Cookie" => array:1 [
0 => "__cf_bm=RSAR2G_ypza4CvxsLK3.57dNqp8Xd_ySCCVJxEuyhAY-1740142797-1.0.1.1-ibwFmcME4KJV4qOtks.mNVfZ0ByinxzyMGrw9_wRSRB.iNxWdhKSCxR1_w.aTrmCCDbNhnLoHbW_TXV6FIKKJQ; path=/; expires=Fri, 21-Feb-25 13:29:57 GMT; domain=.pipedrive.com; HttpOnly; Secure; SameSite=None"
]
"Server" => array:1 [
0 => "cloudflare"
]
"alt-svc" => array:1 [
0 => "h3=":443"; ma=86400"
]
]
-headerNames: array:23 [
"date" => "Date"
"content-type" => "Content-Type"
"transfer-encoding" => "Transfer-Encoding"
"connection" => "Connection"
"cf-ray" => "CF-Ray"
"cf-cache-status" => "CF-Cache-Status"
"cache-control" => "Cache-Control"
"strict-transport-security" => "Strict-Transport-Security"
"vary" => "Vary"
"accept-ch" => "accept-ch"
"access-control-expose-headers" => "access-control-expose-headers"
"badi" => "badi"
"critical-ch" => "critical-ch"
"x-content-type-options" => "x-content-type-options"
"x-correlation-id" => "x-correlation-id"
"x-daily-requests-left" => "x-daily-requests-left"
"x-ratelimit-limit" => "x-ratelimit-limit"
"x-ratelimit-remaining" => "x-ratelimit-remaining"
"x-ratelimit-reset" => "x-ratelimit-reset"
"x-xss-protection" => "x-xss-protection"
"set-cookie" => "Set-Cookie"
"server" => "Server"
"alt-svc" => "alt-svc"
]
-protocol: "1.1"
-stream: GuzzleHttp\Psr7\Stream^ {#1370
-stream: stream resource {@1366
wrapper_type: "PHP"
stream_type: "TEMP"
mode: "w+b"
unread_bytes: 0
seekable: true
uri: "php://temp"
options: []
}
-size: null
-seekable: true
-readable: true
-writable: true
-uri: "php://temp"
-customMetadata: []
}
}
#decoded: null
+cookies: GuzzleHttp\Cookie\CookieJar^ {#1355
-cookies: array:1 [
0 => GuzzleHttp\Cookie\SetCookie^ {#1378
-data: array:10 [
"Name" => "__cf_bm"
"Value" => "RSAR2G_ypza4CvxsLK3.57dNqp8Xd_ySCCVJxEuyhAY-1740142797-1.0.1.1-ibwFmcME4KJV4qOtks.mNVfZ0ByinxzyMGrw9_wRSRB.iNxWdhKSCxR1_w.aTrmCCDbNhnLoHbW_TXV6FIKKJQ"
"Domain" => ".pipedrive.com"
"Path" => "/"
"Max-Age" => null
"Expires" => 1740144597
"Secure" => true
"Discard" => false
"HttpOnly" => true
"SameSite" => "None"
]
}
]
-strictMode: false
}
+transferStats: GuzzleHttp\TransferStats^ {#1375
-request: GuzzleHttp\Psr7\Request^ {#1367
-method: "POST"
-requestTarget: null
-uri: GuzzleHttp\Psr7\Uri^ {#1356
-scheme: "https"
-userInfo: ""
-host: "api.pipedrive.com"
-port: null
-path: "/v2/products/7083/variations"
-query: ""
-fragment: ""
-composedComponents: "https://api.pipedrive.com/v2/products/7083/variations"
}
-headers: array:5 [
"Content-Length" => array:1 [
0 => "138"
]
"User-Agent" => array:1 [
0 => "GuzzleHttp/7"
]
"Host" => array:1 [
0 => "api.pipedrive.com"
]
"x-api-token" => array:1 [
0 => "130b7c77692627ad8bfac8813fcdf2ff347d744b"
]
"Content-Type" => array:1 [
0 => "application/json"
]
]
-headerNames: array:5 [
"content-length" => "Content-Length"
"user-agent" => "User-Agent"
"host" => "Host"
"x-api-token" => "x-api-token"
"content-type" => "Content-Type"
]
-protocol: "1.1"
-stream: GuzzleHttp\Psr7\Stream^ {#1358
-stream: stream resource {@1356
wrapper_type: "PHP"
stream_type: "TEMP"
mode: "w+b"
unread_bytes: 0
seekable: true
uri: "php://temp"
options: []
}
-size: 138
-seekable: true
-readable: true
-writable: true
-uri: "php://temp"
-customMetadata: []
}
}
-response: GuzzleHttp\Psr7\Response^ {#1374}
-transferTime: 0.431049
-handlerStats: array:38 [
"url" => "https://api.pipedrive.com/v2/products/7083/variations"
"content_type" => "text/html"
"http_code" => 405
"header_size" => 1116
"request_size" => 343
"filetime" => -1
"ssl_verify_result" => 0
"redirect_count" => 0
"total_time" => 0.431049
"namelookup_time" => 0.001351
"connect_time" => 0.024299
"pretransfer_time" => 0.06789
"size_upload" => 138.0
"size_download" => 5241.0
"speed_download" => 12158.0
"speed_upload" => 320.0
"download_content_length" => -1.0
"upload_content_length" => 138.0
"starttransfer_time" => 0.42999
"redirect_time" => 0.0
"redirect_url" => ""
"primary_ip" => "104.18.188.228"
"certinfo" => []
"primary_port" => 443
"local_ip" => "172.18.0.5"
"local_port" => 42932
"http_version" => 2
"protocol" => 2
"ssl_verifyresult" => 0
"scheme" => "HTTPS"
"appconnect_time_us" => 67855
"connect_time_us" => 24299
"namelookup_time_us" => 1351
"pretransfer_time_us" => 67890
"redirect_time_us" => 0
"starttransfer_time_us" => 429990
"total_time_us" => 431049
"appconnect_time" => 0.067855
]
-handlerErrorData: 0
}
}