GithubHelp home page GithubHelp logo

Comments (5)

BatunaAz avatar BatunaAz commented on May 26, 2024

i can not create ticket too.

passed array:
$property = array();
$property[0]['property'] = "hs_pipeline";
$property[0]['value'] = "0";
$property[1]['property'] = "hs_pipeline_stage";
$property[1]['value'] = "1";
$property[2]['property'] = "hubspot_owner_id";
$property[2]['value'] = $owner[$ext];
$property[3]['property'] = "subject";
$property[3]['value'] = $number;
$property[4]['property'] = "source_type";
$property[4]['value'] = "PHONE";
Response: {"status":"error","message":"Cannot create object with type: TICKET. The following required properties were missing: [hs (truncated...)

i have no idea, why error occured,

from hubspot-php.

rodjsta avatar rodjsta commented on May 26, 2024

@BatunaAz, it says it in your response. You're missing required params.

from hubspot-php.

BatunaAz avatar BatunaAz commented on May 26, 2024

if i use node API it works for passed params. Only PHP packages return this error.

from hubspot-php.

ksvirkou-hubspot avatar ksvirkou-hubspot commented on May 26, 2024

Hi @BatunaAz
for me it works correctly with your properties

$hubspot = Factory::createWithOAuth2Token('*');
$response = $hubspot->tickets()->create([
    [
        'name' => 'subject',
        'value' => 'Ticket api v2',
    ],
    [
        'name' => 'source_type',
        'value' => 'PHONE',
    ],
    [
        'name' => 'hubspot_owner_id',
        'value' => '*',
    ],
    [
        'name' => 'hs_pipeline',
        'value' => '0',
    ],
    [
        'name' => 'hs_pipeline_stage',
        'value' => '1',
    ],
]);

from hubspot-php.

ksvirkou-hubspot avatar ksvirkou-hubspot commented on May 26, 2024

Hi @nitinupify
you can create an custom property using CRM Object Properties API

$hubspot = Factory::createWithOAuth2Token('*');
$response = $hubspot->objectProperties('tickets')->create($property)

you can create an ticket using Tickets API

$hubspot = Factory::createWithOAuth2Token('*');
$response = $hubspot->tickets()->create($ticket)

from hubspot-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.